== ValidateThis QuickStart Guide == Follow these simple steps to get started using the framework: # Download the framework from [http://validatethis.riaforge.org validatethis.riaforge.org]. # Unzip the contents of the distribution into a folder on your machine. You can place this folder in your webroot, or place it elsewhere and create a mapping to it called ''ValidateThis''. # Create a [[Rules Definition File]] for a Business Object for which you want ValidateThis to generate validations. Take a look at the [[Sample Rules Definition File]] for an example. # In your application code, create a [[ValidateThisConfig Struct]], and then instantiate the [[ValidateThis Facade Object | ValidateThis.cfc facade object]], passing in the struct, like so: Where: * ''definitionPath'' points to the folder into which you placed your [[Rules Definition File]] in step 3
More information on the keys that can be used in the ValidateThisConfig struct is available under [[ValidateThisConfig Struct | Configuring the Framework]].
You will now be able to call methods on the ValidateThis facade object to perform server-side and generate client-side validations. For example, to perform server-side validations on an object, use the ''validate()'' method:
To generate client-side validations, use the ''getValidationScript()'' method:
Note that for many of the built-in validation types you'll also have to include some initialization Javascript which is generated by calling the ''getInitializationScript()'' method:
Also note that the use of ''cfhtmlhead'' above is just a way of illustrating that you need to place the results of those method calls into your generated html in some way. You do not have to use cfhtmlhead to do that.
For more information on interacting with the ValidateThis.cfc facade object, see the section on [[ValidateThis Facade Object | Using the ValidateThis Facade Object]].
== What's Next? == More info is available on: * [[Defining Validation Rules]] * [[ValidateThisConfig Struct | Configuring the Framework]] * [[ValidateThis Facade Object | Using the ValidateThis Facade Object]] * [[Working with the Result Object]] * [[Internationalization with ValidateThis]]