Package com.skyline.common.validation

Examples of com.skyline.common.validation.Errors


   *            需要验证的Bean或者Map或者String
   * @return 如果不空表示校验不通过,在调用后必须调用{@link BaseController#processValidationErrors(String, String, ModelAndView)}
   *
   * */
  protected <T> String validateForm(String formName, T bean) {
    Errors errors = ValidationUtils.validateForm(formName, bean);
    String[] errorMsgs = ValidationUtils.getAllErrorMessages(errors);
    if (errorMsgs.length < 1) {
      return null;
    } else {
      return errorMsgs[0];
View Full Code Here


      result.put("logined", Boolean.FALSE);
      return result;
    }
    result.put("logined", Boolean.TRUE);

    Errors errors = ValidationUtils.validateForm("descriptionOnlyForm", description);
    String[] errorMsgs = ValidationUtils.getAllErrorMessages(errors);
    if (errorMsgs.length > 0) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", errorMsgs[0]);
      return result;
View Full Code Here

TOP

Related Classes of com.skyline.common.validation.Errors

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.