/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rjconsultores.ventaboletos.web.utilerias;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zul.Constraint;
/**
 *
 * @author Rafius
 */
public class ConstraintDoubleBox implements Constraint {

    public void validate(Component comp, Object value) throws WrongValueException {
        if (value == null || ((Double) value)  > 9999999
                || ((Double) value) <= 0) {
            throw new WrongValueException(comp,
                    Labels.getLabel("MSG.CONSTRAINT.DECIMALBOX"));
        }
    }
}
