__get()
__get(string $property)
Magic getter method
Parameters
string | $property |
Throws
- \BadMethodCallException
FieldValidator Class
This class handles all the validation logic
__construct(\ValidFormBuilder\Element $objField, array $arrValidationRules = array(), array $arrErrorHandlers = array(), array $arrSanitizationRules = null)
Construct new validation object
\ValidFormBuilder\Element | $objField | |
array | $arrValidationRules | |
array | $arrErrorHandlers | |
array | $arrSanitizationRules |
getValue(integer $intDynamicPosition) : string|array|null
Get the value to validate from either the global request variable or the cached __validvalues array.
integer | $intDynamicPosition | Using the intDynamicPosition parameter, you can get the specific value of a dynamic field. |
Returns the submitted field value. If no sumitted value is set,
return value is the cached valid value. If no cached value is set, return value is the default value. If no
default value is set, return value is null. When field type is ValidForm::VFORM_FILE
and a file is submitted,
the return value is the $_FILES[fieldname]
array.
validate(integer $intDynamicPosition) : boolean
The most important function of ValidForm Builder library.
This function handles all the server-side field validation logic.
integer | $intDynamicPosition | Using the intDynamicPosition parameter, you can validate a specific dynamic field, if necessary. |
True if the current field validates, false if not.