Extends
- FieldValidatorTools
Methods
initialize(conf_obj, db, sessions)
Takes in the configuration data necessary to intialize the application_tests table in the super (FieldValidatorTools).
Calls setup_tests.
Parameters:
| Name | Type | Description |
|---|---|---|
conf_obj |
object | |
db |
object | |
sessions |
object |
- Source:
setup_tests()
Sets up the validators that will look for particular fields belonging to a query object.
The field set
- Source:
valid(post_body, fields) → {boolean}
The list of fields will be from the field_set of this class.
The fields will be picked out by the name of a transition or operation.
If the list has not been defined by configuration, then this method will default to returning true, passing
the validation of data entries (format, syntax, simple semantics).
First, if the field parameter is a string, this method searches for the fields object matching the key.
Given, the parameters is a string and is not in the field_set, this method will search in the local database for
the field object.
If either the fields were pasts as an object or a search proved successful in finding it, the form data of the
object, post_body, will be examined using the previously configured tests in the ``application_tests` table.
Parameters:
| Name | Type | Description |
|---|---|---|
post_body |
object | |
fields |
object | string | either a key to a list of a list. |
- Source:
Returns:
- Type
- boolean