Announcement Announcement Module
Collapse
No announcement yet.
validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • validation

    I don't know how to change validation method for different action state.
    There is (in FormAction class) method:
    Code:
    protected void validate(RequestContext context, Object formObject, Errors errors) throws Exception {
    		String validatorMethod = getProperty(VALIDATOR_METHOD_PROPERTY, context);
    		if (StringUtils.hasText(validatorMethod)) {
    			invokeValidatorMethod(validatorMethod, formObject, errors);
    		}
    		else {
    			getValidator().validate(formObject, errors);
    		}
    	}
    But I don't understand how to set property VALIDATOR_METHOD_PROPERTY and where it its better to do :roll:

  • #2
    The VALIDATOR_METHOD_PROPERTY tells the action what method to invoke on the configured Validator object.

    You can set this property in the definition of the action state.

    Comment


    • #3
      Validation

      But how? I didn't see any samples with validation. :oops: Please could you show me example or tell where i could see it :roll:

      Comment


      • #4
        See the 'sellitem' sample in samples/webflow.

        Comment


        • #5
          validaton

          ooooooops! :shock: How could miss it?!! Thanks! :P

          Comment

          Working...
          X