SForm_Rule_Maxlenth __construct(
string
$message, SForm_Element
$element, integer
$maxlen
)
|
|
Setup client side checking
If the element is a text input, we can enable client side checking with minimal overhead via the 'maxlength' attribute. Do so.
Parameters:
|
string |
$message: |
Error message |
|
object Element |
$element: |
to check |
|
integer |
$maxlen: |
Maximum number of chars |
Redefinition of:
- SForm_Rule::__construct()
- Construct a rule with one element and one error message
Is it too long?
API Tags:
| Return: | True if it's too long |
| Access: | public |
Redefinition of:
- SForm_Rule::isError()
- Returns true if this element(s) fail validation
void toJavaScript(
string
0
)
|
|
Generate JavaScript to determine if the value is too long
Returns the requested JavaScript validation code.
Parameters:
API Tags:
Redefinition of:
- SForm_Rule::toJavaScript()
- Get the JavaScript that should be run onsubmit