Check whether user input is correct with a mask / Groovy
I want to create a verification for a user-input field, which will help to identify whether a user had filled it in correctly or not. The verification is a mask-based – [0-9]{10}, therefore if a user enters “123”, the system should notify them about the incorrest input, and if the user enters “1234567891” then everything should be fine. I cannot understand which function should I use, so that the verification works out.