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:

Verifier :: create (Input :: All (), array ('name' = & gt; 'required | Minimum: 2 '));

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 composer.json "frozennode / xssinput": "dev-master ",

then config / app.php to provider

  'Frozennode \ XssInput \ XssInputServiceProvider'   

and aliases

  'input' = & gt; frisanode \ xsynpid \ xsinpp ' 

Then it can do some sanitaryization

  some modell :: create (array ('name' = & gt; input :: receive ('name'), 'description' = & Gt; Input :: find ('description'));  

Checkout library on github

In this way, you do not need to change your code. Just do

  Composer Update  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -