Page 1 of 1

exactly 10 digits

Posted: 2021-04-07 12:04
by baudwalker
what I require is to have an input that must have exactly 10 digits without zero fill. I have restricted the maximum length using bigint(10) this will physically stop the eleventh digit being typed, but how do I set the minimum and give an error message?

thank you in anticipation Barry

Re: exactly 10 digits

Posted: 2021-04-07 12:15
by jsetzer
Did you try with a custom pattern-attribute on that input field?

There is another thread here started by you and answered by pböttcher:
viewtopic.php?f=4&t=4225&p=16699&hilit= ... cab#p16699

Doesn't that work?

Re: exactly 10 digits

Posted: 2021-04-08 01:18
by baudwalker
Thank you Jan, I could not find that old post.

just have to get a custom error message

Re: exactly 10 digits

Posted: 2021-04-08 15:52
by pfrumkin
RE: custom error message did you see viewtopic.php?t=1740?

I suggest to google "appgini custom error."

~Paul