$validation->add_field('message', 'Nachricht', 'required|trim|max_length[400]|htmlentities|valid_string[alpha,dashes,numeric,spaces,quotes,punctuation,newlines,commas,tabs,braces,brackets,utf8]|min_length[5]');
I need to allow dashes, but i already done this and it still not working.
Did i use something wrong?
$validation = \Fuel\Core\Validation::forge();
$validation->add_field('user_name', 'Name', 'required|trim|valid_string[utf8]|min_length[3]|max_length[70]');
$validation->add_field('email', 'E-Mail Adresse', 'required|trim|valid_email');
$validation->add_field('message', 'Nachricht', 'required|trim|max_length[400]|htmlentities|valid_string[alpha,dashes,numeric,spaces,quotes,punctuation,newlines,commas,tabs,braces,brackets,utf8]|min_length[5]');
if( $validation->run( ) )
{
$articles = \Model_Comment::forge( $data );
if( $articles->save() )
{
return \Fuel\Core\Response::redirect( 'comments/index/' . $article_id );
}
}
array (size=3)string 'test' (length=4)
'user_name' =>
It looks like you're new here. If you want to get involved, click one of these buttons!