Codeigniter入門學習筆記14—表單的驗證

  • 好久好久之前學習Codeigniter的筆記記錄,很隨意,但都是本身記錄的,但願對須要的人有所幫助。
  • 本文使用word2013編輯併發布
  • Postbird | There I am , in the world more exciting!
  • Postbird personal website : http://www.ptbird.cn

    表單驗證 web

一、add_user 併發

    ] 學習

二、form_check() ui

    

三、 this

 

一、加載 spa

    $this->load->library('form_validation'); 3d

二、設置各類規則 orm

    $this->form_validation->set_rules('user_name','姓名','required'); blog

    $this->form_validation->set_rules('user_password','密碼','required'); ci

    $this->form_validation->set_rules('user_email','郵箱','required');

三、 運行

    $bool=$this->form_validation->run();

四、反饋錯誤信息

    echo form_error('user_password');

 

相關文章
相關標籤/搜索