Bro, the code in your video is not working. I think the validation library has changed in CI 4.1.4. The code "display_error($validation,'username')" generate undefined variable for $validation on loading the form. This is because the variable $validation is only created if there are validation errors.
Congratulations on the CodeIgniter 4 video! I would like to know how to decide between validating field data directly in the entity's Modal class or using the validation done before, in the Controller, using the config that would be declared in the Config/Validation.php file or even in another local this setting?
The error "Undefined variable $validation", is occurring because the $data array is being passed to the view only for else condition. To resolve this, you need to make sure that the $data array is always passed to the view. Just add one line in your controller function "$data['validation'] = null;" after the "$data = [];" Also, you have to add the get and post routes i.e $routes->get('formvalidation', 'FormValidation::index'); $routes->post('formvalidation', 'FormValidation::index'); I hope this will resolve the issue.
sir i am facing an error called ErrorException Undefined variable: validation showing in my span when i am using the logic for every field its working correctly. but using it with span it showing me error.
$this->request->getMethod() this method is working is fine for us in latest version and old versions Can you tell me, where exactly you are getting the problem
@@GoPHP sir can you please help me with one question. I want to get country data from databases and. when I'm going to sign in after that I want to store this country name into a database how can I do this can you please suggest me something or please help me..
Thank you so much sir. I will shared your channel in my face book also. this lesson series is great work.
Thank You Kulasiri
May Allah Bless You Sir!
Clearest explanation of every concept!
Keep Shining!
Much valuable work! Completes official doc, which is not so clear on many points as V3 was (my opinion) Thank you very much !.
Your way of explanation is very helpful for beginners. Keep posting.
clear enough to understand. keep going, thank you
Bro, the code in your video is not working. I think the validation library has changed in CI 4.1.4. The code "display_error($validation,'username')" generate undefined variable for $validation on loading the form. This is because the variable $validation is only created if there are validation errors.
yes facing the same issue here. Any Solutions ?
Fantastic
Marvellous
Excellent...👌👌👌👌👌
this series helps a lot to me thank you
Congratulations on the CodeIgniter 4 video!
I would like to know how to decide between validating field data directly in the entity's Modal class or using the validation done before, in the Controller, using the config that would be declared in the Config/Validation.php file or even in another local this setting?
The error "Undefined variable $validation", is occurring because the $data array is being passed to the view only for else condition. To resolve this, you need to make sure that the $data array is always passed to the view.
Just add one line in your controller function "$data['validation'] = null;" after the "$data = [];"
Also, you have to add the get and post routes i.e
$routes->get('formvalidation', 'FormValidation::index');
$routes->post('formvalidation', 'FormValidation::index');
I hope this will resolve the issue.
thanks man big help
Hello.. May i ask.. How to validate array input from from .. How to handle it ini controller and how to send old value into that form again.. Thank
Sir, how to create custom validation functions. Eg: $this->form_validation->set_rules('npwd', 'New Password', 'callback_check_password'); in CodeIgniter 3. Please replay
Hi, is set_value() will work for the radio and checkbox as well? Or need to use any other method?
i got error undefined variable $validation .. please resolve me sir
Error: Call to undefined function display_error() for this error
solution :-
sir i am facing an error called
ErrorException
Undefined variable: validation
showing in my span
when i am using the logic for every field its working correctly.
but using it with span it showing me error.
we got some problem, hope the author helping us
@@gttrackpro9433 if you having same problem as mine above
then use this on your view page before where you showing error
@@aamirahmed103 thanks man! It works ☺️
I have done exactly what had done but I'm facing an error: Undefined variable $validation. Can you tell me why I'm facing this error?
we have same problem :(
@@gttrackpro9433 same prblm any solution?
Sir how to form validation using jQuery.
When i use GetMethod the codeiginter 4 automatically over strike the GetMethod .. clearly (GetMethod ka uper line lag jati ha 😑)
I am using vs code can you help me
getMethod() is deprecated can you suggest me another way?
$this->request->getMethod()
this method is working is fine for us in latest version and old versions
Can you tell me, where exactly you are getting the problem
@@GoPHP error is showing on vscode only
It's working.
Thanks!
Call to undefined function display_error() getting this error sir
display_error () is not predefined function
I created a that function
Try to watch the complete video. In that I explained how to create the function.
@@GoPHP thank you sir how could I contact you If I have any doubts in Codeigniter 4
@@GoPHP sir can you please help me with one question. I want to get country data from databases and. when I'm going to sign in after that I want to store this country name into a database how can I do this can you please suggest me something or please help me..
@@sudeeplamsoge9960 WhatsApp : 9885776740
@@GoPHP thank you so much, sir
can u send me this code
please check the Whole project here
github.com/gophptrainings/CodeIgniter-4-project