Adds a equal to comparision. This checks that the values of the form fields are equal if they aren't then the message is displayed.
void
AddEqualToComparison
(string $itemOne, string $itemTwo, string $message)
-
string
$itemOne: this is the name of the first field to compare
-
string
$itemTwo: this is the name of the second field to compare
-
string
$message: this is message that is displayed if the fields are not equal
This method adds another field to the form. You need to add a field to the form to return the value in the associative array as well as to perform valudation on it.
void
AddField
(string $name, string $type, string $isRequired, [string $formName = null], [string $default = null])
-
string
$name: this is the name of the form field
-
string
$type: this is the type of the form field
-
string
$isRequired: this indicates if the field is a required field
-
string
$formName: this is the form name that field is part of. This isn't needed if there is only one form
-
string
$default: this is the default value of the field if it is left empty.
This adds a unique form identifier this indicates that a form field only belongs to one of the forms on the page. Note you only need to use this method if there are is more than one form on a page.
void
AddFormIdentifier
(string $fieldName, string $formName)
-
string
$fieldName: this is the field name that uniquely identifies the form
-
string
$formName: this is the form name that you want to assign to the form
Adds a item one is greater than item two comparision. This checks that the values of the form field item one is greater than item two if they aren't then the message is displayed.
void
AddItemOneGreaterThanTwoComparison
(string $itemOne, string $itemTwo, string $message)
-
string
$itemOne: this is the name of the first field to compare
-
string
$itemTwo: this is the name of the second field to compare
-
string
$message: this is message that is displayed if the validation fails
Adds a item one is less than item two comparision. This checks that the values of the form field item one is less than item two if they aren't then the message is displayed.
void
AddItemOneLessThanTwoComparison
(string $itemOne, string $itemTwo, string $message)
-
string
$itemOne: this is the name of the first field to compare
-
string
$itemTwo: this is the name of the second field to compare
-
string
$message: this is message that is displayed if the validation fails
Adds a not equal to comparision. This checks that the values of the form fields are not equal if they aren't then the message is displayed.
void
AddNotEqualToComparison
(string $itemOne, string $itemTwo, string $message)
-
string
$itemOne: this is the name of the first field to compare
-
string
$itemTwo: this is the name of the second field to compare
-
string
$message: this is message that is displayed if the fields are equal
This returns a associative array with the field name as the key and the field value as the value.
void
GetAssociativeArrayData
()
This returns the form that has just posted back.
void
GetCurrentForm
()
This returns a array of error messages. This also ensures that the form has been validated if this is called.
void
GetErrors
()
This method returns a field based on its name
-
string
$name: this is the name of the form field to return
This sets the form type
void
SetFormType
(string $type)
-
string
$type: this sets the type of form RocksPost or RocksGet
This checks that all form fields pass all the validation tests.
void
Validate
()