Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.ValidatorException


            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

            throws ValidatorException
    {
        String string = (String) object;

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

        if ((object == null)
                || (String.class.isInstance(object) && (((String) object).length() == 0))
                || (Collection.class.isInstance(object) && ((Collection) object).isEmpty()))
        {
            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 e)
        {
            throw new ValidatorException(buildMessage(field, getMessageKey()), getConstraint());
        }
    }
View Full Code Here

        converter.coerceValue(validator, Iterator.class);
        converterControl.setReturnValue(Collections.singleton(validator).iterator());

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);
       
        ValidatorException expected = new ValidatorException("test");
       
        try
        {
            validator.validate(field, messages, object);
            validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
View Full Code Here

        delegate.recordFieldInputValue(text);
       
        field.getTranslator();
        fieldControl.setReturnValue(translator);
       
        ValidatorException expected = new ValidatorException("Failure");
       
        try
        {
            translator.parse(field, text);
            translatorControl.setThrowable(expected);
View Full Code Here

        trainGetElementId(formc, form, component, "barney");
        trainIsRewinding(formc, form, true);

        trainGetParameter(cyclec, cycle, "barney", " text area value ");

        ValidatorException exception = new ValidatorException("test");
       
        try
        {
            tfs.parse(component, " text area value ");
            tfsc.setThrowable(exception);
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.