Package org.mod4j.runtime.validation

Examples of org.mod4j.runtime.validation.MaxLengthValidator


    validation.addValidator(new NotNullValidator(Customer.class,
        "customerNr"));

    validation.addValidator(new MinLengthValidator(Customer.class,
        "username", USERNAME_MINLENGTH));
    validation.addValidator(new MaxLengthValidator(Customer.class,
        "username", USERNAME_MAXLENGTH));

    validation.addValidator(new RegExpValidator(Customer.class,
        "emailAddress", EMAILADDRESS_REGEXP));
View Full Code Here


  public static final Integer NAME_MAXLENGTH = 50;

  private void addValidators() {

    validation.addValidator(new NotNullValidator(Superclass.class, "name"));
    validation.addValidator(new MaxLengthValidator(Superclass.class,
        "name", NAME_MAXLENGTH));

  }
View Full Code Here

  private void addValidators() {

    validation
        .addValidator(new NotNullValidator(Artist.class, "artistName"));

    validation.addValidator(new MaxLengthValidator(Artist.class,
        "biography", BIOGRAPHY_MAXLENGTH));

  }
View Full Code Here

TOP

Related Classes of org.mod4j.runtime.validation.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.