Created
July 18, 2014 06:58
-
-
Save samgooi4189/8c2f2fe85f8d6211843a to your computer and use it in GitHub Desktop.
Paasing false in hidden field will get validation error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After wondering why I can't pass my model validation after assigning false boolean, | |
I run some test in console. | |
I found out that the value false is equivalent to blank. So if you set your model to validate presence, you will get error when you pass false into your input field. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment