Package com.form

Examples of com.form.Registration


  public boolean supports(Class<?> klass) {
    return Registration.class.isAssignableFrom(klass);
  }

  public void validate(Object target, Errors errors) {
    Registration registration = (Registration) target;
    ValidationUtils.rejectIfEmptyOrWhitespace(errors, "userName",
        "NotEmpty.registration.userName",
        "User Name must not be Empty.");
    String userName = registration.getUserName();
    if ((userName.length()) > 50) {
      errors.rejectValue("userName",
          "lengthOfUser.registration.userName",
          "User Name must not more than 50 characters.");
    }
    if (!(registration.getPassword()).equals(registration
        .getConfirmPassword())) {
      errors.rejectValue("password",
          "matchingPassword.registration.password",
          "Password and Confirm Password Not match.");
    }
View Full Code Here


  }

  // Display the form on the get request
  @RequestMapping(method = RequestMethod.GET)
  public String showRegistration(Map model) {
    Registration registration = new Registration();
    model.put("registration", registration);
    return "registrationform";
  }
View Full Code Here

TOP

Related Classes of com.form.Registration

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.