-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Boolean with "true" and "false" doesnt work #2857
Comments
This is working as intended: https://laravel.com/docs/7.x/validation#rule-boolean String "true"/"false" are not accepted under the |
Unless I'm blind it states that it indeed accepts them. The field under validation must be able to be cast as a boolean. Accepted input are true, false, 1, 0, "1", and "0". |
Your input is a string, so "true" or "false" and these are not accepted. |
Shouldn't this then just be a Checkbox or Dropdown instead of a textbox? |
Probably, yes, but that is unrelated to this issue specifically (and there is an open issue somewhere about adding those types of fields). @Software-Noob the |
Please provide additional information too, depending on what you have issues with:
I tried to add a variable as an boolean for Nest configurations which should require "true & false".
When I tried to set a server up it said that I the variable should be "true" or "false". But it clearly is true. 0 and 1 work normally...
PHP-Version: PHP 7.3.19-1~deb10u1
Docker Version: Docker Inc., v0.9.1-beta3
Steps to reproduce the behavior:
Expected behavior:


Accepting true or false as valid boolean. (It accepts 0 and 1)
The text was updated successfully, but these errors were encountered: