Check if a text field contains any numbers in EDC/CDMS
When using a text field, you can use the following template to check whether the field contains any numbers and display a message of your choice.
Create a calculation field in the study form using the calculation field example below - remember to replace 'variable_name' with the variable name for the text field. You can also update the messages shown to display the wording you prefer.
if ((/\d/).test('{variable_name}')) {
"The entered value contains numbers."
} else {
"The entered value does not contain any numbers."
}
Test the calculation in the calculation helper.