Hello, I use Codecanyon-ploNMuQ4-quform. I try to block bad words in my message form element using the Regex-Validator (preg_match). So far it works at the page, except I don’t know how making the function to reverse the output. I read something about an “invert option”. But I think that’s for WordPress. Another question would be, if it is possible or advisable to make further processing to die, after the validation?
“$message = new Quform_Element(‘message’, ‘Message’); $message->addFilter(‘trim’); $message->addValidator(‘required’); $message->addValidator(‘regex’, array( ‘pattern’ => ‘/viagra|cialis/’, ‘messages’ => array( ‘preg_match’ => ‘The given value “%s” is not a valid number’ ) )); $form->addElement($message); “