Package org.eweb4j.mvc.validator.annotation

Examples of org.eweb4j.mvc.validator.annotation.Validate


  private static List<ValidatorConfigBean> parseValidators(ReflectUtil ru,
      Method m) {
    List<ValidatorConfigBean> vals = new ArrayList<ValidatorConfigBean>();

    // 读取@Validate注解,拿到需要被验证的参数名称
    Validate validate = m.getAnnotation(Validate.class);
    if (validate == null)
      return vals;
   
    String[] fields = validate.value();
    String[] excepts = validate.except();
    if (fields != null) {
      // 读取Action object 的属性 验证信息
      List<ValidatorConfigBean> fieldVal = ValidatorUtil.readValidator(fields,excepts, null, ru, null, null);
      if (fieldVal != null)
        vals.addAll(fieldVal);
View Full Code Here

TOP

Related Classes of org.eweb4j.mvc.validator.annotation.Validate

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.