Advertisement
CesarBalzer

Untitled

Feb 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. //Arquivo config/form_validation.php
  2. $config = array(
  3.     'meu_controller/nome_da_funcao' => array(
  4.         array(
  5.             'field' => 'title',
  6.             'label' => 'Title',
  7.             'rules' => 'required|minlength[6]',
  8.             'errors' => array(
  9.                         'required' => 'Sua mensagem com o campo %s.',
  10.                 ),
  11.         ),
  12.         array(
  13.             'field' => 'body',
  14.             'label' => 'Body',
  15.             'rules' => 'required|minlength[6]'
  16.         )
  17.     ));
  18. //Na validacao
  19. if ($this->form_validation->run("meu_controller/nome_da_funcao")) {
  20.     //faz o que precisa
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement