Object | --Persistent | --Component | --FormValidator
Located in File: /jsval/formvalidator.inc.php
Use this component to get an easy way to validate your form, by checking for specific data.
Rules for validation are stored on the Rules property, which is an array, in which every element is a rule to check.
After that, you can use javascript to call the validation function, which is named as the component plus _validate, for example fvValidate_validate().
That function shows any message if required and returns false if validation is not met, true otherwise.
![]() | Rules | This property specifies the rules to validate the form |
![]() | ValidateCompleteForm | Specifies if the validation is to be perform on the complete for or field by field |
Defined in class Component |
||
![]() | Name | Specifies the name for the component. The name is used as an identifier and should be unique. |
![]() | Tag | A versatile property of every Component that can be used in any way you want |
![]() | ComponentCount | Indicates the number of components owned by the component. |
![]() | Components | Lists all the components owned by this component. |
![]() | ControlState | A flag to know the state of the control, csLoading, csDesigning |
![]() | DataFieldValue | This property returns the value of the datafield if any. |
![]() | NamePath | Specifies the path to uniquely identify a component, qualified by the owner when required. |
![]() | Owner | Indicates the component that is responsible for streaming and freeing this component. |
Defined in class Persistent |
||
![]() | NamePath | Used to serialize/unserialize. It returns the full path to identify this component. |
![]() | Owner | Owner of the component. |
property Rules (line 101)
Use this property to specify the validation rules to test against. In Delphi for PHP, there is a property editor you can use to setup this property, if you want do it in runtime, you can setup this array dynamically.
property ValidateCompleteForm (line 116)
If this property is set to true, all rules will be checked against the form, if false, will be checked from top to bottom and if one is not matched, the process will be aborted and a message will be shown.
property Name
property Tag
property ComponentCount
property Components
property ControlState
property DataFieldValue
property NamePath
property Owner
property NamePath
| __construct | Component constructor [Overrides Component::__construct()] |
| dumpHeaderCode | Dumps header code required [Overrides Component::dumpHeaderCode()] |
| dumpJavascript | Dumps the javascript code needed by this component [Overrides Component::dumpJavascript()] |
Defined in class Component |
||
![]() | dumpChildrenJavascript | Dumps the javascript code for all the children |
![]() | dumpFormItems | Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components |
![]() | dumpHeaderCode | Dumps header code required |
![]() | dumpJavascript | Dumps the javascript code needed by this component |
![]() | hasValidDataField | Returns true if a valid data field is attached to the component |
![]() | init | Initializes a component |
![]() | loaded | Initializes the component after the form file has been read into memory. |
![]() | loadedChildren | Calls childrens loaded |
![]() | preinit | Method called before init() |
![]() | serializeChildren | Serializes all children |
![]() | unserializeChildren | Unserializes all children by calling unserialize for all the components |
Defined in class Persistent |
||
![]() | serialize | Stores this object into the session. |
![]() | unserialize | This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call. |
Defined in class Object |
||
![]() | __construct | Constructs an object and initializes its data before the object is first used. |
![]() | className | Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument). |
![]() | classParent | Returns the type of the immediate ancestor of a class. |
Constructor __construct (line 62)
Overrides : Component::__construct() Component constructor
Method dumpHeaderCode (line 135)
Overrides : Component::dumpHeaderCode() Dumps header code required
Method dumpJavascript (line 121)
Overrides : Component::dumpJavascript() Dumps the javascript code needed by this component