exactly 10 digits

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
baudwalker
Veteran Member
Posts: 159
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

exactly 10 digits

Post by baudwalker » 2021-04-07 12:04

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1050
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: exactly 10 digits

Post by jsetzer » 2021-04-07 12:15

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?
Kind regards,
<js />

User avatar
baudwalker
Veteran Member
Posts: 159
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

Re: exactly 10 digits

Post by baudwalker » 2021-04-08 01:18

Thank you Jan, I could not find that old post.

just have to get a custom error message

pfrumkin
Veteran Member
Posts: 119
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: exactly 10 digits

Post by pfrumkin » 2021-04-08 15:52

RE: custom error message did you see viewtopic.php?t=1740?

I suggest to google "appgini custom error."

~Paul

Post Reply