-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numeric validation errors on use of Zero "0" #4
Comments
Good catch. PHP likes to treat the number zero as representing an empty value. This will fix it: Edit line 370 of fields/field.dynamictextgroup.php that says Change it to: I'll add this fix in the next commit. Feel free to close this when you can confirm the fix works. Thanks! |
Hey Brock, Tried that but still get error.. something to do with required field checkbox I'm thinking. See my screen shot. http://dl.dropbox.com/u/670078/Screen%20shot%202011-09-30%20at%2009.42.50.png I have the numeric field with a required checkbox. I'm using latest branch. |
It looks like you aren't using the latest dev version. Version You can read me and Nils' discussion about this here; I'm pretty sure this is what's causing your problem. That version also adds checkbox and radio button subfield types, so you'll be able to use those rather than doing the text input workaround you're using. |
Noted. Will update. 2.0dev5 in local install. Doh! (Slaphead) |
Haha no problem |
Will pull your branch locally and test while at the Symposium day2 tomorrow. A lot of singing praises for the work youce done here by the way. double kudos |
Wow... Thanks a lot, man— I really appreciate that! So great to hear; very, very, inspiring! To be honest, I was a bit worried that nobody would use this thing... I wish I was there!! |
Hi Brock,
Been playing a bit more and discovered that if my field is a required field and I set the validation of a field to numeric, I can't save the section due to "0" not being validated as a number.
Basically, trying to build a Quiz and have all fields with no value have a count of zero. If it's a positive value, all is well.
I'm not too hot on regex so woudln't know where to begin there.
Is this something you've encountered yet?
The text was updated successfully, but these errors were encountered: