Class FormValidator |
|
Methods |
Classes and Modules |
Included modules |
Public Class methods |
new(profile=nil) |
Constructor.
Public Instance methods |
validate(form, profile) |
This method runs all tests specified inside of profile on form. It sets the valid, invalid, missing and unknown instance variables to the appropriate values and then returns true if no errors occured or false otherwise.
missing() |
Returns a distinct list of missing fields.
unknown() |
Returns a distinct list of unknown fields.
valid() |
Returns a hash of valid fields and their associated values
invalid() |
Returns a hash of invalid fields and their failed constraints