Specific number of digits in number field

Specific number of digits in number field

Hi, I'm trying to set a number field to only accept a specific number of digits.

I wanted the field to accept 10 digits but give an error message if more or less are entered. I would also maybe like the form to return an error if they try to submit it without ensuring the correct amount of digits.

Thanks in advance for any help.