Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.ValidatorException


            throws ValidatorException
    {
        Number value = (Number) object;

        if (value.doubleValue() > _max)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.TOO_LARGE);
    }
View Full Code Here


            throws ValidatorException
    {
        String input = (String) object;

        if (!_matcher.matches(PATTERN, input))
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.EMAIL_FORMAT);
    }
View Full Code Here

            throws ValidatorException
    {
        String input = (String) object;

        if (!_matcher.matches(_pattern, input))
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.PATTERN_MISMATCH);
    }
View Full Code Here

            throws ValidatorException
    {
        String string = (String) object;

        if (string.length() > _maxLength)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.MAXIMUM_WIDTH);
    }
View Full Code Here

    {
        Date date = (Date) object;
        DateTranslator translator = (DateTranslator) getFieldTranslator(field, DateTranslator.class);
       
        if (date.before(_minDate))
            throw new ValidatorException(buildMessage(messages, field, translator),
                    ValidationConstraint.TOO_SMALL);

    }
View Full Code Here

    {
        Date date = (Date) object;
        DateTranslator translator = (DateTranslator) getFieldTranslator(field, DateTranslator.class);
       
        if (date.after(_maxDate))
            throw new ValidatorException(buildMessage(messages, field, translator),
                    ValidationConstraint.TOO_LARGE);
       
    }
View Full Code Here

            throws ValidatorException
    {
        String string = (String) object;

        if (string.length() < _minLength)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.MINIMUM_WIDTH);
    }
View Full Code Here

                || (String.class.isInstance(object) && (((String) object).length() == 0))
                || (Collection.class.isInstance(object) && ((Collection) object).isEmpty())
                || (UploadPart.class.isInstance(object) && ((UploadPart) object).getSize() < 1))
        {
            String message = buildMessage(messages, field);
            throw new ValidatorException(message, ValidationConstraint.REQUIRED);
        }
    }
View Full Code Here

            throws ValidatorException
    {
        Number value = (Number) object;

        if (_min > value.doubleValue())
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.TOO_SMALL);
    }
View Full Code Here

        {
            return format.parseObject(text);
        }
        catch (ParseException ex)
        {
            throw new ValidatorException(buildMessage(messages, field, getMessageKey()),
                    getConstraint());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.valid.ValidatorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.