Package org.infoglue.cms.util.validators

Examples of org.infoglue.cms.util.validators.EmailValidator


          case Constants.EMAIL:
          {
          if (cr.getValue() != null)
          {
            // Create validator
              EmailValidator v = new EmailValidator(cr.getFieldName());
             
              // Set properties
              v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
              v.setRange(cr.getValidRange());
              v.setIsRequired(cr.required);
              v.setMustBeUnique(cr.unique);
              v.setExcludeId(intId);

            // Do the limbo
              v.validate((String) cr.getValue(), ceb);
             
              // <todo>
              // Note: the actual value validated should be extracted
              // from the vo using the fieldname with reflection.
              // </todo>
             
          }             
            break;
          }
        case Constants.STRING:
          {
          if (cr.getValue() != null)
          {           
              StringValidator v = new StringValidator(cr.getFieldName());
              v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
              v.setRange(cr.getValidRange());
              v.setIsRequired(cr.required);
              v.setMustBeUnique(cr.unique);
              v.setExcludeId(intId);

              v.validate((String) cr.getValue(), ceb);
          }             
            break;
          }
          case Constants.FLOAT:
          {
View Full Code Here


          case Constants.EMAIL:
          {
          if (cr.getValue() != null)
          {
            // Create validator
              EmailValidator v = new EmailValidator(cr.getFieldName());
             
              // Set properties
              v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
              v.setRange(cr.getValidRange());
              v.setIsRequired(cr.required);
              v.setMustBeUnique(cr.unique);
              v.setExcludeId(intId);

            // Do the limbo
              v.validate((String) cr.getValue(), ceb);
             
              // <todo>
              // Note: the actual value validated should be extracted
              // from the vo using the fieldname with reflection.
              // </todo>
             
          }             
            break;
          }
        case Constants.STRING:
          {
          if (cr.getValue() != null)
          {           
              StringValidator v = new StringValidator(cr.getFieldName());
              v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
              v.setRange(cr.getValidRange());
              v.setIsRequired(cr.required);
              v.setMustBeUnique(cr.unique);
              v.setExcludeId(intId);

              v.validate((String) cr.getValue(), ceb);
          }             
            break;
          }
          case Constants.FLOAT:
          {
View Full Code Here

        case Constants.EMAIL:
        {
          if (cr.getValue() != null)
          {
            // Create validator
            EmailValidator v = new EmailValidator(cr.getFieldName());
             
            // Set properties
            v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
            v.setRange(cr.getValidRange());
            v.setIsRequired(cr.required);
            v.setMustBeUnique(cr.unique);
            v.setExcludeId(null);
            v.setExcludeObject(userName);

            // Do the limbo
            v.validate((String) cr.getValue(), ceb);
             
            // <todo>
            // Note: the actual value validated should be extracted
            // from the vo using the fieldname with reflection.
            // </todo>
             
          }             
          break;
        }
        case Constants.STRING:
        {
          if (cr.getValue() != null)
          {           
            StringValidator v = new StringValidator(cr.getFieldName());
            v.setObjectClass(vo.getConstraintRuleList().getEntityClass());
            v.setRange(cr.getValidRange());
            v.setIsRequired(cr.required);
            v.setMustBeUnique(cr.unique);
            v.setExcludeId(null);
            v.setExcludeObject(userName);

            v.validate((String) cr.getValue(), ceb);
          }             
          break;
        }
        case Constants.FLOAT:
        {
View Full Code Here

TOP

Related Classes of org.infoglue.cms.util.validators.EmailValidator

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.