Package org.strecks.validator

Examples of org.strecks.validator.MaxLengthValidator


    try
    {
      BadlyTypedValidatorForm bean = new BadlyTypedValidatorForm();

      Method method = bean.getClass().getMethod("getRequiredInteger");
      MaxLengthValidator validator = new MaxLengthValidator();

      ValidationAnnotationReader reader = new ValidationAnnotationReader();
      reader.checkValidatorType("propertyName", method, validator.getClass(), Validator.class,
          ValidateInteger.class);

      Assert.fail("Should have caught " + ApplicationConfigurationException.class);

    }
View Full Code Here


{

  public ValidatorWrapper create(Annotation annot, Method method)
  {
    ValidateMaxLength annotation = (ValidateMaxLength) annot;
    MaxLengthValidator validator = new MaxLengthValidator();
    validator.setLength(annotation.maxLength());

    List<Object> parameters = new ArrayList<Object>();
    parameters.add(annotation.maxLength());

    return create(validator, annotation.key(), annotation.order(), parameters, method);
View Full Code Here

TOP

Related Classes of org.strecks.validator.MaxLengthValidator

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.