Validation rules: text length
Front end
If you enter a number of characters that is outside the specified range, edc2go will indicate this with a message:
at this point, you can either:
- Save the form with an open query.
- Cancel the save action and go back to the form to complete the required question(s).
Design: Specify text length range
- Make sure that your CRF has status 'Design'.
- Go to your design area via My Studies --> CRF.
- Go to the applicable visit and form and click the '+ Add validation rule' button on the right hand side of the applicable question:
On the left hand side of the window is the list of all available validation rules of that particular element type:
Each element type has its own set of validation rules. To see an overview of possible validation rules per element type, check out this article.
- Check the box in front of the 'Text length' validation rule.
- Specify a minimum (MIN field) and/or maximum (MAX field) number of characters.
- The query text is present by default as:"The text should be at least [value min] (this is the number as specified in the MIN field) and maximum [value max] (this is the number as specified in the MAX field) characters". You can update this text as applicable for your question.
- Click the Save button.
- the '+Add validation rule' button is now displayed as ' üText length' but the button is still functional. Click this button to edit the validation rule(s) for this question.
This question also has an indication of 'Sub-question'. For more information on how to define an element as sub- question, check out this article.