__construct () RocksForm _结构 ()
增加了一个比较平等。 这支票,表单字段的值是相等的,如果他们不那么显示该消息。
AddEqualToComparison ( string $itemOne , string $itemTwo , string $message ) 无效 AddEqualToComparison( 字符串 , 字符串 $ itemTwo, 字符串 $ itemOne消息 )
- $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( 字符串 $ fieldName的 字符串 $ 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( 字符串 , 字符串 $ itemTwo, 字符串 $ itemOne消息 )
- $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( 字符串 , 字符串 $ itemTwo, 字符串 $ itemOne消息 )
- $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( 字符串 , 字符串 $ itemTwo, 字符串 $ itemOne消息 )
- $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 字符串 $消息 :这是消息显示,如果字段是相等的
这将返回关联数组作为键和值的字段值的字段名1。
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 验证 ()