With this validation rule you can:
- define a field as numeric (allowing only numeric characters: 0-9)
- specify a minimum and/or maximum value for the field (see this article)
- specify a minimum and/or maximum value based on a linked question (see this article)
Front endIf a single line field is specified as 'numeric', edc2go will display a message whenever non-numeric characters are entered:
at this point, you can either:
- Save the form with an open query.
- Cancel the save action and go back to the form to correct the value(s).
Design: numeric field
A numeric field only allows for numeric values (0-9), no alphanumeric or special characters.
- 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 'Numeric range' validation rule.
- The specifications for a minimum (MIN field) and/or maximum (MAX field) range should be indicated as 'None'
- The query text is present by default as:"This field should be numeric". You can update this text as applicable for your question.
- Click the Save button.
- the '+Add validation rule' button is now displayed as ' üNumeric range' but the button is still functional. Click this button to edit the validation rule(s) for this question.