__construct () RocksForm __construct()
添加一个比较平等的。 这检查表单字段的值是相等的,如果他们不那么的消息显示。
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddEqualToComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息 )
- $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
- $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
- $message : this is message that is displayed if the fields are not equal 字符串 $消息 :这是显示的信息是,如果字段不等于
这种方法增加了另一个领域的形式。 你需要添加一个字段的形式返回关联数组中的价值,以及执行它valudation。
AddField ( string $name , string $type , string $isRequired , [ string $formName = null ], [ string $default = null ]) 无效 AddField( 字符串 $名称 , 字符串 $类型 , 字符串 $ isRequired, 字符串 $ formName = NULL],[ 字符串 $默认 = NULL])
- $name : this is the name of the form field 字符串 名称 :这是表单域的名称
- $type : this is the type of the form field 字符串 $类型 :这是表单字段的类型
- $isRequired : this indicates if the field is a required field 字符串 $ isRequired:这表明如果该字段是必填字段
- $formName : this is the form name that field is part of. 字符串 $ formName:这是表单的名称,字段的一部分。 这是不需要的,如果只有一个形式
- $default : this is the default value of the field if it is left empty. 字符串 $默认 :这是字段的默认值,如果它为空 。
这增加了一个独特的形式标识符,这表明一个表单域只属于页面上的一种形式。 注意:如果有不止一个页面上的形式,你只需要使用此方法。
AddFormIdentifier ( string $fieldName , string $formName ) 无效 AddFormIdentifier( 字符串 字段名 , 字符串 $ formName)
- $fieldName : this is the field name that uniquely identifies the form 字符串 $ fieldName的 :这是字段的名称,唯一标识的形式
- $formName : this is the form name that you want to assign to the form 字符串 $ formName:这是你想要的形式分配给窗体的名称
添加一个项目一个是比两个项目比较大。 这支票,表单域的项目之一值是大于项目两个,如果他们不那么消息显示。
AddItemOneGreaterThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneGreaterThanTwoComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息 )
- $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
- $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
- $message : this is message that is displayed if the validation fails 字符串 $消息 :这是如果验证失败,显示的信息是
增加一个项目一个是比两个项目比较少。 这支票,表单域的项目之一值是小于项目两个,如果他们不那么消息显示。
AddItemOneLessThanTwoComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddItemOneLessThanTwoComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息 )
- $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
- $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
- $message : this is message that is displayed if the validation fails 字符串 $消息 :这是如果验证失败,显示的信息是
添加不等于一个比较。 这将检查表单字段的值不相等,如果他们不那么消息显示。
AddNotEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddNotEqualToComparison( 字符串 $ itemOne, 字符串 $ itemTwo, 字符串 消息 )
- $itemOne : this is the name of the first field to compare 字符串 $ itemOne:这是第一个字段的名称进行比较
- $itemTwo : this is the name of the second field to compare 字符串 $ itemTwo:这是第二个字段的名称来比较
- $message : this is message that is displayed if the fields are equal 字符串 $消息 :这是信息显示领域的平等
这将返回一个关联数组作为键和值的字段值的字段的名称。
GetAssociativeArrayData () 无效 GetAssociativeArrayData()
这将返回刚刚调回的形式。
GetCurrentForm () 无效 GetCurrentForm()
这将返回一个错误消息的数组。 这也可以确保如果这就是所谓的形式已经得到验证。
GetErrors () 无效 GetErrors()
基于它的名字,该方法返回一个领域
- $name : this is the name of the form field to return 字符串 名称 :这是返回的表单域的名称
这集的形式类型
SetFormType ( string $type ) ( 字符串 $类型 无效 SetFormType)
- $type : this sets the type of form RocksPost or RocksGet 字符串 $类型 :这台形式RocksPost或RocksGet
这将检查所有的表单域通过所有的验证测试。
Validate () void 验证 ()