#26 Form Validations in CodeIgniter 4

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024

Комментарии • 40

  • @kulasiriniit
    @kulasiriniit 3 года назад +2

    Thank you so much sir. I will shared your channel in my face book also. this lesson series is great work.

    • @GoPHP
      @GoPHP  3 года назад

      Thank You Kulasiri

  • @learner4166
    @learner4166 3 года назад +1

    May Allah Bless You Sir!
    Clearest explanation of every concept!
    Keep Shining!

  • @foxbille
    @foxbille 3 года назад

    Much valuable work! Completes official doc, which is not so clear on many points as V3 was (my opinion) Thank you very much !.

  • @uniteakiladevi
    @uniteakiladevi Год назад

    Your way of explanation is very helpful for beginners. Keep posting.

  • @sophoissourn4096
    @sophoissourn4096 4 года назад +1

    clear enough to understand. keep going, thank you

  • @truthteachers
    @truthteachers 2 года назад +2

    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.

    • @uniteakiladevi
      @uniteakiladevi Год назад +1

      yes facing the same issue here. Any Solutions ?

  • @kunchamsatishkumar
    @kunchamsatishkumar 4 года назад

    Fantastic
    Marvellous
    Excellent...👌👌👌👌👌

  • @sudeeplamsoge9960
    @sudeeplamsoge9960 3 года назад

    this series helps a lot to me thank you

  • @FabianoSouzadeOliveira
    @FabianoSouzadeOliveira 2 года назад +1

    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?

  • @anmolprashar7737
    @anmolprashar7737 Год назад +1

    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.

  • @kupkup2D
    @kupkup2D Год назад

    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

  • @shayeenkk5046
    @shayeenkk5046 2 года назад

    Sir, how to create custom validation functions. Eg: $this->form_validation->set_rules('npwd', 'New Password', 'callback_check_password'); in CodeIgniter 3. Please replay

  • @gauravdeveloper
    @gauravdeveloper 2 года назад

    Hi, is set_value() will work for the radio and checkbox as well? Or need to use any other method?

  • @brivasIT
    @brivasIT Год назад

    i got error undefined variable $validation .. please resolve me sir

  • @sachinkb7335
    @sachinkb7335 4 месяца назад

    Error: Call to undefined function display_error() for this error
    solution :-

  • @aamirahmed103
    @aamirahmed103 3 года назад

    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.

    • @gttrackpro9433
      @gttrackpro9433 3 года назад

      we got some problem, hope the author helping us

    • @aamirahmed103
      @aamirahmed103 3 года назад +6

      @@gttrackpro9433 if you having same problem as mine above
      then use this on your view page before where you showing error

    • @sankalpvyas7365
      @sankalpvyas7365 2 года назад

      @@aamirahmed103 thanks man! It works ☺️

  • @mihirpaghdal7974
    @mihirpaghdal7974 3 года назад

    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?

    • @gttrackpro9433
      @gttrackpro9433 3 года назад

      we have same problem :(

    • @brivasIT
      @brivasIT Год назад

      @@gttrackpro9433 same prblm any solution?

  • @gopalsrinivas753
    @gopalsrinivas753 3 года назад

    Sir how to form validation using jQuery.

  • @SpaceWondersHub
    @SpaceWondersHub 3 года назад

    When i use GetMethod the codeiginter 4 automatically over strike the GetMethod .. clearly (GetMethod ka uper line lag jati ha 😑)

  • @jeet9145
    @jeet9145 3 года назад

    getMethod() is deprecated can you suggest me another way?

    • @GoPHP
      @GoPHP  3 года назад

      $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

    • @jeet9145
      @jeet9145 3 года назад +1

      @@GoPHP error is showing on vscode only
      It's working.
      Thanks!

  • @sudeeplamsoge9960
    @sudeeplamsoge9960 3 года назад

    Call to undefined function display_error() getting this error sir

    • @GoPHP
      @GoPHP  3 года назад

      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.

    • @sudeeplamsoge9960
      @sudeeplamsoge9960 3 года назад +1

      @@GoPHP thank you sir how could I contact you If I have any doubts in Codeigniter 4

    • @sudeeplamsoge9960
      @sudeeplamsoge9960 3 года назад

      @@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..

    • @GoPHP
      @GoPHP  3 года назад +1

      @@sudeeplamsoge9960 WhatsApp : 9885776740

    • @sudeeplamsoge9960
      @sudeeplamsoge9960 3 года назад

      @@GoPHP thank you so much, sir

  • @ankithshenoy5813
    @ankithshenoy5813 3 года назад

    can u send me this code

    • @GoPHP
      @GoPHP  3 года назад +1

      please check the Whole project here
      github.com/gophptrainings/CodeIgniter-4-project