php - Class 'Validate' not found in Laravel Validation process -
I am now studying Laravel and I have a problem with the verification messages displayed in my page. I have this error after clicking submit button
Symphony \ component \ debug \ exception \ FatalErrorException (E_ERROR) class 'valid' not found ----------- - ---------------------------------- Open: C: \ wamp \ vhosts \ flax_order \ app \ routes. Php 'Lastname' = & gt; Minimum: 2 | Maximum: 15 ',' first name '= & gt; Minimum: 2 | Maximum: 20 ',' midlnum '= & gt; Minimum: 10 | Maximum: 20 ',' password '= & gt; 'Required | Min: 8 | Maximum: 30 ',' cpassword '= & gt; 'Required: A: Password'); $ Validator = valid: create (input :: all (), $ rules); If ($ validator-> fails ()) { I've put the verification process in my path here. Here's my sample code.
Here's the form
@if ($ error- & gt; is) $foreach ($ errors-> All $ ($) as $ Error) {{$ error}} @ adverburn @ adif & lt; Form Action = "{{Action ('Employees Controller / Handle Register')}}" Method = "Post" role = "Form" & gt; & Lt; P class = "required" & gt; Fields marked with (*) are required. & Lt; / P & gt; & Lt; Div class = "form-group" & gt; & Lt; Label & gt; Employee code: & lt; / Labels & gt; & Lt; Data type = "text" class = "form-control tooltip_detail" name = "emp_code" data-toggle = "tooltip" value = "" data-placement = "top" title = "{{$ instructions ['code']} } "/ & Gt; & Lt; / Div & gt; .....
Here is my controller
Public Function Register () {$ instructions = array ('code' = & gt; Ex: 0001, 'Last Name' = East: Peterson, 'First Name' = & gt; 'East: Johlon', 'Midllyam' = & gt; Formerly: P., 'Password' = & gt; Choose password carefully ',' Cpassword '= & gt;' Repeat your password '); See Return: Create ('Register', Array ('Page_ Title' => 'Food: Food Order', 'Instructions' = & gt; $ instructions,)); } Public function handleAuthor () {}
Here are my routes. Php
Root :: find ('/', 'employee controller @ index'); Route :: Mill ('Register', 'Employee Controller Register'); Route: Receive ('/ handling registrar', 'handler of staff controller'); Root :: post ('/ handleRegister', function () {$ rules = array ('emp_code' = & gt; 'numeric | exists: employee', 'last name' = & gt; 'min: 2 | maximum: 15 'Minimum: 2 | Maximum: 20', 'Midlenam' = & gt; 'Minimum: 10 | Maximum: 20', 'Password' = & gt; 'Required | Min: Max | 30: 30', ' ($ Validator- & gt; fails ()) {$ messages = $ validator} = $ validator = $ validator = $ validator = cpassword '= & gt; Required one: password'); $ validator = Valid: : Create (Input :: All (), $ rule) -> Message (); Return to redirect :: From ('Register') -> S ($ recognizer);} other {FD ( "OK");}});
I do not know where I went wrong. Can you help me in it? I am not very good at Laravel.
you laravel
class that is not validator
Valid
What the error message is saying. In short, it signals you out of that class
Comments
Post a Comment