-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[5.5] add ability to show input value in validation error messages #21175
Conversation
@themsaid This can lead to XSS errors when showing errors using something like Sweetalert... |
It's not used by default in the framework, it's optional so you can use it if you want and apply xss protection on the form submission before handing it to the validator. |
@themsaid finally it is fixed I have raised this bug earlier in 5.4 but I am unable to find it but will be good to see if you can send it to 5.4 as well as it is more of a patched. |
I would call the place-holder |
@taylorotwell renamed to |
I suggested this on TWITTER 😃 !, is it available on 5.4? |
@leyluj nope, 5.5 only, 5.4 isn't maintained anymore. The upgrade is really easy you should do it :) |
Noted let me try. Thanks |
Done, i have upgraded but :input is not working. What might be the problem? |
@leyluj will be released on next patch. |
@@ -266,6 +268,24 @@ protected function replaceAttributePlaceholder($message, $value) | |||
} | |||
|
|||
/** | |||
* Replace the :actual_value placeholder in the given message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:input here:)
@themsaid Will this be made clear in the documentation? |
With this PR, you can have the error message of the email rule as
:actual_value is not a valid email
, and the error output will becomeMohamed is not a valid email.