Jump to content

integer field with minimal value = 0 doesn't work


valan
 Share

Recommended Posts

Privet! I've just found that if you create integer field with minimal allowed value 0 (zero), then it doesn't save it. As a result, input accepts negative values even with HTML5 input type. Is it a bug or feature?

Link to comment
Share on other sites

yep, I didn't think about that and my workaround doesn't do you any good in this case. 

I had a look at the module and this is by design, but I don't think Ryan had considered the case where you may want a zero, but not negative numbers. I think it needs to be submitted as a bug.

In the meantime, try commenting line 30 in wire/core/modules/InputField/InputfieldInteger.module and let me know if that works.

  • Like 1
Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...