Ws.FormValidation
Winshuttle Designer Controls
- Supported InfoPath controls
- Ws.Assignment
- Ws.Attachment
- Ws.Button
- Ws.Comment
- Ws.CurrentUser
- Ws.FormCompletionDelegation
- Ws.FormName
- Ws.FormValidation
- Ws.History
- Ws.Lookup
- Ws.ProcessControl
- Ws.Query
- Ws.SAP Field Lookup
- Ws.SharePointUserMap
- Ws.SharePointUsers
- Ws.URL
- Ws.ViewInfo
- Ws.WebService
- Ws.WorkflowParticipant
- Wso.WebService Lookup
The Ws.FormValidation control can be used to validate data that a user enters into a form. Regular expressions and comparison operations can be configured, and server-side code can be written to do custom validations if the existing functionality does not meet your needs. The regular expression syntax is standard, and references to the regular expression syntax can be found in numerous places on the Web.
Download example (.wssln file)
**Validation will not run until the user submits the form to the workflow (i.e. clicks Save and Route).
Ws.FormValidation properties
Property | Description |
Comparisons |
|
Ordinal | The order in which the validator control should run. |
Plug-in Validator |
|
Regular Expressions |
|
TIP: You can find regular expressions on the Web to validate just about anything. Open your favorite search engine and enter the type of expression that you want—for example, if you want an expression to validate an email address, search for "Regular expression for email address". It also provides many expressions and includes ratings for the expressions, in addition to showing you what will fail and what will pass. (See the example below).
Configuring the Ws.FormValidation Control
First, add the Ws.FormValidation control to your form. Right-click the control and then select Properties.
Configuring Regular Expressions
- In the RegExp field, enter your regular expression that you have written and tested
- In the Field column, enter the name of the field you wish to validate.
- In the Message Column, enter the message that you want displayed to the user if validation fails.
**If you have more than three validation items, add another Ws.FormValidation control.
Configuring Comparison expressions
- In the Field 1 column, enter the left most field you want to compare.
- In the Comparison column, select the operator required for the expression.
- In the Field 2 column, enter the name of the right-most field you want to compare against.
- In the Message column, enter the message that you want displayed to the user if the validation fails.
TIP: If you have more than three validation items, add another Ws.FormValidation control.