phpDocumentor SForm
Rules
[ class tree: SForm ] [ index: SForm ] [ all elements ]

Class: SForm_Rule_Required

Source Location: /SForm.php

Class SForm_Rule_Required

Class Overview

Is the given element required?

Make an element required. This generates both server side and client side code. Note that as is, a simple space (' ') will be valid, so I suggest you account for that.

Located in /SForm.php [line 2536]

SForm_Rule
   |
   --SForm_Rule_Required

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SForm_Rule

SForm_Rule::$elements
SForm_Rule::$hasParent
SForm_Rule::$jsElmNum
SForm_Rule::$jsElmVar
SForm_Rule::$message
SForm_Rule::$validateOnClient

Inherited From SForm_Rule

SForm_Rule::__construct()
Construct a rule with one element and one error message
SForm_Rule::assignParent()
Mark this rule as having a parent
SForm_Rule::createJSRule()
Create a basic if-then rule in JavaScript
SForm_Rule::escClient()
Escape client side variables
SForm_Rule::genJSValue()
Returns JS to get a value and save it in the local variable
SForm_Rule::isError()
Returns true if this element(s) fail validation
SForm_Rule::toJavaScript()
Get the JavaScript that should be run onsubmit
SForm_Rule::toString()
Returns a message describing the error and its cause
SForm_Rule::validateOnClient()
Should we run validation code on the client

[ Top ]
Method Summary
boolean   isError()   Does the element have a value?
void   toJavaScript()   Generate JavaScript to determine if there is a value

[ Top ]
Methods
isError  [line 2542]

  boolean isError( )

Does the element have a value?


API Tags:
Return:  True if there is no value.
Access:  public


Redefinition of:
SForm_Rule::isError()
Returns true if this element(s) fail validation

[ Top ]
toJavaScript  [line 2553]

  void toJavaScript( string 0  )

Generate JavaScript to determine if there is a value

Returns the requested JavaScript validation code.

Parameters:
string   0:  JavaScript

API Tags:
Access:  public


Redefinition of:
SForm_Rule::toJavaScript()
Get the JavaScript that should be run onsubmit

[ Top ]

Documentation generated on Mon, 09 Apr 2007 19:08:51 -0500 by phpDocumentor 1.3.0