I have this form.
{!! Form::open(['action' => 'ArticlesController@store', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
<div class="form-group">
Form::select('size', array(
'L' => 'Large',
'S' => 'Small'
));
</div>
{!! Form::close() !!}
The user will have a dropdown list to select Large (value: L) or Small (value: S). But if the user, let say, changes the value of any of those options using the dev tools, or whatever.
How can I validate the form if the user sends the 'size' field with a value that wasn't originally in the select options?
I mean, how can I check that the sent value is L or S, but not anything else.
Because the user could easily edit the form and send whatever value he wants to send, he could send a value that wasn't suppose to be sent.
I can do that using the validate class, but if instead of a 2 options list it is a 100 options list that'd be impossible.
Thanks!