Contact Form 7: custom validation [closed]
Hope I did get it right: <?php function specialValidation($value) { $explode = explode(‘ ‘, $value); if(sizeof($explode) > 1) { echo ‘ERROR: You have input more than one word.’; return; } $mustBeS = substr($explode[0],0,1); if($mustBeS != ‘s’ && $mustBeS != ‘S’) { echo ‘ERROR: Your word must start with an “s” or “S”.’; return; } }