__construct () RocksForm __コンストラクト ()
比較です。に等しいが追加されます。 彼らはそのメッセージが表示されていない場合、フォームフィールドの値が等しいことを確認するためです。
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:これは、比較する2番目のフィールドの名前です
- $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( 文字列 $ nameは 、 文字列 $タイプ 、 文字列 $ IsRequiredは 、[ 文字列 $ formnameを = NULL]、[ 文字列 $デフォルト = NULL])
- $name : this is the name of the form field $ nameを 文字列 :これは、フォームフィールドの名前です。
- $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を :これはフィールドの一部であることをフォーム名です。 1つのフォームのみが存在する場合、これは必要ありません
- $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を :これは、フォームに割り当てたいフォーム名です。
項目1項目2比較です。より大きいが追加されます。 彼らはそのメッセージが表示されていない場合、フォームフィールドの項目1の値は項目2より大きいことを確認するためです。
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:これは、比較する2番目のフィールドの名前です
- $message : this is message that is displayed if the validation fails 文字列 $メッセージ :これは、検証が失敗した場合に表示されるメッセージです。
項目1項目2比較です。未満で追加されています。 彼らはそのメッセージが表示されていない場合、フォームフィールドのアイテムのいずれかの値がアイテム2未満であることを確認するためです。
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:これは、比較する2番目のフィールドの名前です
- $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:これは、比較する2番目のフィールドの名前です
- $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 $ nameを 文字列 、これは返されるフォームフィールドの名前です。
これは、フォームの種類を設定します
SetFormType ( string $type ) ボイド SetFormType( 文字列 $タイプ )
- $type : this sets the type of form RocksPost or RocksGet 文字列 $のタイプ :これは、フォームRocksPostまたはRocksGetの種類を設定します。
これはすべてのフォームフィールドは、すべての検証テストに合格しているかどうかをチェックします。
Validate () validate()を無効