php - Does Laravel's Validation class Sanitize? -
I was unable to find any information in the document or not whether the validation class has cleaned the data or not. Everyone uses verification classes for obvious reasons, but I do not see any hygiene. For example, take a form with 2 input fields, names and details. In this case, only the name is required to handle form submissions:
Assume that according to most tutorials (and documentation), there are no errors with verification, I will use the bus;
SomeModel :: create (array ('name' => Input :: get ('name'), 'description' => Input :: get ('description') );
Will this class clear the data? Or can I expect that the exact data entered in the data form will be the same? At least 2 characters are not required
Any direction is appreciated.
As far as I know Laravel has not sanitized
add it to then and Then it can do some sanitaryization Checkout library on github In this way, you do not need to change your code. Just do composer.json
"frozennode / xssinput": "dev-master ",
config / app.php
to provider
'Frozennode \ XssInput \ XssInputServiceProvider'
aliases
'input' = & gt; frisanode \ xsynpid \ xsinpp '
some modell :: create (array ('name' = & gt; input :: receive ('name'), 'description' = & Gt; Input :: find ('description'));
Composer Update
Comments
Post a Comment