Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Arquivo config/form_validation.php
- $config = array(
- 'meu_controller/nome_da_funcao' => array(
- array(
- 'field' => 'title',
- 'label' => 'Title',
- 'rules' => 'required|minlength[6]',
- 'errors' => array(
- 'required' => 'Sua mensagem com o campo %s.',
- ),
- ),
- array(
- 'field' => 'body',
- 'label' => 'Body',
- 'rules' => 'required|minlength[6]'
- )
- ));
- //Na validacao
- if ($this->form_validation->run("meu_controller/nome_da_funcao")) {
- //faz o que precisa
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement