Date: 2004-05-26T05:41:41 Editor: JamesMitchell <[EMAIL PROTECTED]> Wiki: Apache Struts Wiki Page: StrutsBeginnerValidatorFramework URL: http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework
no comment Change Log: ------------------------------------------------------------------------------ @@ -14,10 +14,16 @@ }}} -Struts validator framework is neat way of validating you UI input. Some of the most common UI input validation includes, checking for mandatory fields, email validation, credit card validation, etc. +Some of the most common UI input validation includes, checking for mandatory fields, email validation, credit card validation, etc. The Validator framework is a great way of validating your UI input. +The core of the Validator framework comes from jakarta-commons where, much like the other components, it is maintained as a separate, independent project that does not require Struts. +The Validator Plugin allows us to take advantage of that library in a Struts-familiar way. -Here are some necessary step before we can begin using the struts validation framework +There are 2 different ways to use the validator in Struts. Form-based validation and Action-based validation. The differences are explained in detail in the users guide, but we'll give a quick summary here. +* Form-based validation is validation that gets applied to a particular form name. You can have different validations on the same form, if you specify a different name. +* Action-based validation is validation that gets applied for a specific path (such as "/createCustomer.do"). + +Here are some necessary step before we can begin using the struts validation framework with "form-based" validation (as described above). 1. Create an action form class that extends oeg.apache.struts.validator.ValidatorForm. 2. Create an action class. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
