Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9322443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:05:34+00:00 2026-06-19T04:05:34+00:00

I have a site develop in codeigniter. I want to validate a form and

  • 0

I have a site develop in codeigniter.
I want to validate a form and display some message.
With my code I don’t see any error if my input “name_it” is blank. Why?
This is my controller:

public function nation_create()
    {
        if($_POST)
        {
            //salvo i dati
            $this->load->library('form_validation');
            $this->form_validation->set_error_delimiters('<p class="error">Errore: ', '</p>');
            $this->form_validation->set_rules('name_it', 'name_it', 'required');
            if ($this->form_validation->run() !== FALSE){
                $this->Nation_model->createNation();
                redirect('backend/nation/nation_list/');
            }
            else{
                $data['errors'] = validation_errors();
                $this->load->view('backend/include/header_view_logged');
                $this->load->view('backend/nation_create_view',$data);  
                $this->load->view('backend/include/footer_view');
            }
        }
        else{
            $this->load->view('backend/include/header_view_logged');
            $this->load->view('backend/nation_create_view');    
            $this->load->view('backend/include/footer_view');
        }
    }

And this is my view (I have cut more code to read well)

<form action='' method='POST'>
   <?php echo validation_errors(); 
   if (isset($errors))
      echo $errors;
   ?>
   <?php echo form_error('name_it'); ?>
   <input type="text" name="name_it" />
   <span id="errorsDiv_name_it"></span>
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T04:05:35+00:00Added an answer on June 19, 2026 at 4:05 am

    The problem was in the class error with attribute display:none

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site develop in codeigniter and I want to make a function
I need to develop a site on Drupal 7. I have some content types
We will develop a web site that will have some free services and we
I have a site develop in Codeigniter, and in my model I have a
I have a site develop in cakephp 2.0 I want to make a HABTM
I have a site develop in php and jquery. I want in a div
I have a site develop in jquery. I want to select all id that
I have installed xt:commerece a shoping cart related site. I want to develop a
Hi I have a site develop in cakephp. I want to connect my cakephp
Im using wordpress to develop a site ... I want to display everything in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.