I'm looking to get a custom validator working with a form I'm building via FormItBuilder.
(Revo 2.2.4-pl with FormItBuilder 1.3.2-pl)
I keep receiving an error when I try to do the following:
$ucup_formRules[] = new FormRule('wordCountUnder150', $ucup_fe_letter);
The error is
Fatal error: Uncaught exception 'Exception' with message 'Type "wordCountUnder150" not valid.
which implies to me I need to somehow create a rule type. Any leads on how to do that?
Based on what I could glean from the FormIt.Validators documentation, I thought I may have been doing that by including
$ucup_form->setCustomValidators('wordCountUnder150');
I'd also tried
$ucup_form->setValidate('wordCountUnder150');
The contents of wordCountUnder150 seems irrelevant at this stage because it errors even if the only contents are
Can anyone provide any guidance on what I might be doing wrong here?
(I am aware of the custom validator documentation at
http://modxrevo.datawebnet.com.au/adding-your-own-custom-validation but was hoping to do this with a custom validator rather than a hook if that's possible.)