I add a snippet to limit the number of words for post content in the form and I get this error:
Cannot redeclare function my_validation.
Solution:
Change the name of the function as you used that somewhere else on your WordPress installation:
add_filter('cred_form_validate','chr_validation',10,2);
function chr_validation($field_data, $form_data)
{
//field data are field values and errors
list($fields,$errors)=$field_data;
//check if post_title field is more than 500 words
if ( str_word_count($fields['post_content']['value']) > 500 )
{
//set error message for post_content field
$errors['post_content']='500 word count exceeded. Please, use less words for your description.';
}
//return result
return array($fields,$errors);
}