Rule To Stop Submission Of Default Form Value

I have a model with a form, the form has a pre-populated value "Enter Your Data Here".

Unfortunately this is a valid submission by my model rules, but I want to require that people fill in there own data and not submit the default, I tried the following rule without success, any suggestions?


array('model', 'compare', 'compareValue'=>'Enter your data here.', 'operator'=>'!='),

OK, did a little more digging, compare is obviously not the way to go, trying now with regular expression, but it is still letting it though, any help is appreciated.

Current code:


array('model', 'match','pattern'=>'/^(Enter your data here).*$/','not'=>true,'message'=>'Please enter your data'),

Hi Ian

I don’t think you need regex for what you are trying to achieve.

You say the default value in your form is "Enter Your Data Here" but this


array('model', 'compare', 'compareValue'=>'Enter your data here.', 'operator'=>'!='),

is looking for "Enter your data here."

Those values are different. Make sure the value you are comparing is the same as the default value in your form.

If the default value in your form is "Enter Your Data Here" then the rule


array('model', 'compare', 'compareValue'=>'Enter Your Data Here', 'operator'=>'!='),

should work.