Legacy Mac OS X Reference Library Apple Developer Connection

JSValidatedField

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 the text conforms to these rules, JSValidatedField submits the form. Otherwise it displays a message and does not submit the form. This elements JavaScript only fires if a user tabs to a field before submitting the form. If a particular field is never tabbed in to, the JavaScript isn’t inovked on that field.

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.



Last updated: 2004-12-02

Did this document help you? Yes It's good, but... Not helpful...