• Is this normal?

    “Email is invalid”, “___ is too short”

    But it sends the form anyway.

    None of the built in checks stop form sending. minlength:8

    It’s all in the hand written code in the theme. wpcf7_validate_textarea etc

    Is there a plugin that works for those, instead of having to ftp in files each time editing the site?

    Or a way to read my own minlength:8 and write another function in the theme code?

    • This topic was modified 1 year, 8 months ago by mayy3321.
Viewing 1 replies (of 1 total)
  • Thread Starter mayy3321

    (@mayy3321)

    I already have stuff like

    	if(empty($_POST[$tag->name]) || strlen($_POST[$tag->name]) == 0) {
    		$result->invalidate( $tag, "Field cannot be empty." );
    	}
    	
    	return $result;

    But what’s a good way to do minlength myself? I can’t set them all the same. I’m basically coding the form in php not in the plugin.

    I guess the recommended contact form 7 way is to write each code? so all emails in the theme must be 6 char, or something like that? I’ll have 1 function for each type of field.

    doesn’t help with all the text fields.

    • This reply was modified 1 year, 8 months ago by mayy3321.
    • This reply was modified 1 year, 8 months ago by mayy3321.
Viewing 1 replies (of 1 total)
  • The topic ‘Form validation doesn’t stop submit’ is closed to new replies.