Require input length for entity primary key

Phone number is the primary key. Is there a way to require 10 characters on input?


I have the mask as (###) ###-#### but the entry accepts inputs less than 10 characters

Thats just mask for format.
Would creating entity via automation with prompt for primary field be an option?

It could be, but after redoing a huge chunk of automation I can’t be arsed to roll a custom entity screen for all of that right now. Maybe at some point in the future.

Does regex not work in format field?

Didn’t seem to work


1 Like

0000000000 should work

0 Digit, required. This element will accept any single digit between 0 and 9.


Thanks Mark. Though it only allows integer 0-9 entry, one is still able to continue with less than 10 integers entered.


We’re trying to avoid this with lazy input by employees:


I’m thinking JTR’s suggestion may be the only way.

Maybe validate entity selected event with a check on primary field length and prompt to update if wrong?
May put short in but forced to correct when selecting new entity?

1 Like