See SAIL Recipes for information about how to work through recipes and adapt them to your application.
Enforce that the user enters no more than a certain number of characters in their text field, e.g. to match the size constraint on a database column.
Test it out
Type more than 5 characters in the first text field to see the validation message. The form cannot be submitted while the validation message is displayed.
Notice that the second text component doesn't show the validation message until the user types into it. This is because the text value isn't considered invalid until it has a value. See also: Validating User Inputs
When testing offline, the form queues for submission but returns the validation messages when you go back online and the form attempts to submit.
To write your data to process
Save your interface as sailRecipe
Create interface inputs: varA (Text), varB (Text)
Remove the load() function
Delete local variables: local!varB, local!varB
In your expression, replace:
local!varA with ri!varA
local!varB with ri!varB
In your process model, on the process start form or forms tab of an activity, enter the name of your interface in the search box and select it
Click Yes when the process modeler asks, "Do you want to import the interface inputs?"
On a task form, this will create create node inputs
On a start form, this will create parameterized process variables