package com.rjconsultores.ventaboletos.web.utilerias;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zul.Constraint;

public class ConstraintNumbersOnly implements Constraint {
	
	@Override
	public void validate(Component comp, Object value) throws WrongValueException {
		if (!value.toString().matches("\\d+"))
			throw new WrongValueException(comp, "Somente números "+value);
	}

}
