Package org.cast.cwm.data.validator

Examples of org.cast.cwm.data.validator.UniqueUserFieldValidator


      // this would be the standard portion of this
      add(new FeedbackBorder("usernameBorder")
        .add(new TextField<String>("username")
            .add(StringValidator.lengthBetween(6, 32))
            .add(new PatternValidator("[\\w-.]+"))
            .add(new UniqueUserFieldValidator(Field.USERNAME))
            .setRequired(true)));
     
      add(new FeedbackBorder("firstnameBorder")
        .add(new TextField<String>("firstName")
          .add(StringValidator.maximumLength(32))
          .setRequired(false)));
     
      add(new FeedbackBorder("lastnameBorder")
        .add(new TextField<String>("lastName")
          .add(StringValidator.maximumLength(32))
          .setRequired(false)));
     
      add(new FeedbackBorder("emailBorder")
        .add(email = (TextField<String>) new TextField<String>("email")
          .add(EmailAddressValidator.getInstance())
          .add(StringValidator.maximumLength(255))
          .add(new UniqueUserFieldValidator(Field.EMAIL))
          .setRequired(true)));
     
      add(new FeedbackBorder("verifyEmailBorder")
        .add(verifyEmail = (TextField<String>) new TextField<String>("verifyEmail", new Model<String>())
          .setRequired(true)));
View Full Code Here


      add(firstName);

      // E-mail Address
      TextField<String> email = new TextField<String>("email", new PropertyModel<String>(mUser, "email"));
      email.add(EmailAddressValidator.getInstance());
      email.add(new UniqueUserFieldValidator(mUser, Field.EMAIL));
      add(email);

      TextField<String> userName = new TextField<String>("username", new PropertyModel<String>(mUser, "username"));
      userName.add(new SimpleAttributeModifier("maxlength", "32"));
      userName.setRequired(true);
      userName.add(new UniqueUserFieldValidator(mUser, Field.USERNAME));
      add(userName);
         
      // RSAPasswordTextField does not seem to work well with Ajax
      // TODO: Fix that
      PasswordTextField password = new PasswordTextField("password", new Model<String>()) {
View Full Code Here

TOP

Related Classes of org.cast.cwm.data.validator.UniqueUserFieldValidator

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.