Web server hosting - 11.2.2.1 The validation-rules.xml file The validation-rules.xml configuration file

11.2.2.1 The validation-rules.xml file The validation-rules.xml configuration file contains a global set of validation rules that can be used out of the box by your application. This file is application-neutral and can be used by any Struts application. You should need to modify this file only if you plan to modify or extend the default set of rules. If you do need to extend the default rules, you might be better off putting your custom rules in a different XML file, so as to keep them separate from the default ones. This will help when it comes time to upgrade to a newer version of the Validator framework. The validator-rules_1_1.dtd describes the syntax of the validation-rules.xml file. The root element is the form-validation element, which requires one or more global elements: Each validator element describes one unique validation rule. The following fragment from the validation-rules.xml file is the definition for the required validation rule: The validatorelement also allows a subelement, but for the sake of brevity it is not shown here. The JavaScript support in the Validator framework is discussed later in the chapter. The validator element supports seven attributes, as shown here:
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Leave a Reply