• Resolved pasttenseofdraw

    (@pasttenseofdraw)


    Hey y’all, is there any way to set a max length on the number of characters on a number field? I know I can set a max value, but I was hoping to limit the number of characters while still forcing the field to be numbers (as opposed to using a text field). Thanks in advance for any insight!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    You can set the number of characters by mentioning larger max value as larger value in that character limit.

    Example:

    • If character length is 2 use 99
    • If character length is 3 use 999
    • If character length is 4 use 9999
    • If character length is 6 use 999999

    Other way of fixing this problem is, You need to buy our premium plugin.
    It has an option to add regex pattern.

    Thank You!

    Thread Starter pasttenseofdraw

    (@pasttenseofdraw)

    That’s what I have in place currently, and it’s working, I was just hoping to match the functionality on the text fields where it doesn’t even allow you to put more than X number of characters into the input box – rather than throwing an error when you try to add it to the cart.

    No worries, thanks for the response!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Max length on number fields’ is closed to new replies.