1) Page-Validate : Validates all properties on the Step page - Mode, Table values, length..etc
2) Property-Validate : Edit-validate rule and/or required. We can list multiple properties.
3) Edit-validate : Referenced in properties, activity (Property-validate) and Validate rules.
- Client side : If you select the option in the harness level (client side), certain OOTB edit validate has the corresponding javascript code (pega_validators.js). By this way it is working as the client side. But for the custom edit validates which was created as part of the application, it definetly works a server side validation.
- Create and test your edit validate rule.
- Associate the edit validate rule with a property.
- Open the rule form of a property.
- On the Advanced tab, under the Use Validate field, select the edit validate rule.
- Create and test a JavaScript function that performs the same validation test as the edit validate rule, and has the same name. Follow the structure used in the standard text file rule webwb.pega_validators.js. For example, if you have associated the property with a IsNotFutureDateTest validate rule that checks if the date falls in the future, you need to create a JavaScript function by the same name such as:/* IsNotFutureDateTest */var ruleEditValidate_notFutureDateTest = new validation_ValidationType("notfuturedatetest", ruleEditValidate_isNotFutureDate);ruleEditValidate_notFutureDateTest.addEventFunction("onchange", ruleEditValidate_isNotFutureDate);
- Save the JavaScript in a text file rule in your application RuleSet.
- Enable client-side validation by clicking the Enable Client Side Validation check box on the Advanced tab of the harness form. For best results use JSP tags and the SmartFrames format for the harness.
- Add the text file rule containing the JavaScript function on the Scripts and Styles tab of each harness that can present the field as an input field, that is, in read-write mode.
4) Validate (Rule-Obj-Validate): Referenced on FlowAction or Activity.
- Edit validate processing operates after edit Input processing and never alters the property value.
No comments:
Post a Comment