PATH |
JSValidatedField
Component Description
This component is similar to a WOTextField and needs to be placed within a WOForm. When the user clicks on one of the form's submit buttons, the text in the field is tested according to the following rules:
- If
inputIsRequired
is set to YES, the text must not be the empty string. - If
requiredText
is not the empty string, the text must contain it.
If the text conforms to these rules, JSValidatedField submits the form. Otherwise it displays a message and does not submit the form.
Synopsis
JSValidatedField { inputText=aVariable; errorMessage=aString; formName=aString; [fieldSize=fieldSize;] [inputIsRequired="YES"|"NO";] [requiredText=requiredText;] };Bindings
- inputText
- The variable into which the entered data is stored.
- errorMessage
- The message to display if the validation fails.
- formName
- The name of the form that contains the JSValidatedField.
- fieldSize
- Specifies the width of the text field.
- inputIsRequired
- If YES, this field must be nonempty before JSValidate Field allows the user to submit the form.
- requiredText
- A string that the entered text must contain before JSValidateField allows the user to submit the form.