Login |  Register 
Your open source Rocks PHP Library has really made developing PHP easier!
Alan
 

RocksFormField Class

Description

Implements interfaces:

  • RocksIValidatable

This class represents a form field and handles validation and value handling. This is usualy used internally.

  • property: string $name: the name of the field
  • property: string $type: the type of the field
  • property: bool $isRequired: if the field is required
  • property: mixed $value: the value of the form field
  • property: bool $isSet: indicates if the form field is set. This is usally used internally
  • property: string $formName: the form name of the form field. This is usally used internally
  • author: Dominic Skinner
  • version: 0.2.1

Located in /RocksFormField.php (line 19)


	
			
Method Summary
RocksFormField __construct (string $name, string $type, string $isRequired, [string $formName = null], [string $default = null])
void AddRegex ( $regex,  $message)
void Validate ()
void __get ( $name)
void __set ( $var,  $varValue)
void __toString ()
Methods
Constructor __construct (line 37)

This creates the form field object

  • access: public
RocksFormField __construct (string $name, string $type, string $isRequired, [string $formName = null], [string $default = null])
  • string $name: this is the name of the form field
  • string $type: this is the type of the form field
  • string $isRequired: this indicates if the field is a required field
  • string $formName: this is the form name that field is part of. This isn't needed if there is only one form
  • string $default: this is the default value of the field if it is left empty.
AddRegex (line 97)
  • access: public
void AddRegex ( $regex,  $message)
  • $regex
  • $message
Validate (line 71)

This checks that all form field pass all the field level validation tests.

  • access: public
void Validate ()

Implementation of:
RocksIValidatable::Validate()
__get (line 112)
  • access: public
void __get ( $name)
  • $name
__set (line 122)
  • access: public
void __set ( $var,  $varValue)
  • $var
  • $varValue
__toString (line 131)
  • access: public
void __toString ()

No comments have been provided.
security image

Written by Dominic Skinner
Last Updated: 2011-10-25 16:00:38