Limiting the value on a form

Hello everyone,

I created a custom field on employee section to enter the insurance number which consists of 11 numbers. I want to limit the field which will accept only 11 numbers such as, 12345678901. I saw a something on custom field section like a script but couldn`t find a close example to imitate.

Create custom script on employee doctype and write your code there.

Setup > customize > custom script

Check this Frappe Cloud