Error validating application
Therefore, you also have to make sure that the values that users enter can be correctly converted to the appropriate data types.
You might also have certain restrictions on the values.
To quickly accomplish this, add the Sometimes you may wish to add validation rules based on more complex conditional logic.
For example, you may wish to require a given field only if another field has a greater value than 100.
In the case of a traditional HTTP request, a redirect response will be generated, while a JSON response will be sent for AJAX requests. Again, if the validation fails, the proper response will automatically be generated.