How can I check in symfony 1.4 if a value is a specific string.
In my html-code I enter a default-value:
<input ... value="Recipe name.">
My current form:
$recipename_value = 'Recipe name.';
$this->setWidgets(array(
'recipename' => new sfWidgetFormInputText(array(), array('size' => '40', 'maxlength' => '150',
'value' => $recipename_value,
$this->setValidators(array(
'recipename' => new sfValidatorString(array('max_length' => 150), array(
'required' => 'Please enter a recipe name.'
)),
The sfValidator should give an error message when the value is Recipe name. How can I do it in symfony? I read a lot about max_- & min_length and sfValidatorSchemaCompare, but nothing with string. Can somebody help me?
Thanks!
Gunnar