예제 #1
0
 function visitTextArea(\cmu\html\form\products\TextArea $component)
 {
     //we can only validate TEXT input
     if (null !== $component->getFiltertype()) {
         $validator = new \cmu\html\form\validate\ValidatorContext($component->getFiltertype());
         if ($validator->validateText($component->getText())) {
             return true;
         } else {
             $component->setErrormessage($validator->getErrorMessagesString());
             //set Fielderrormessage in $component
         }
         //no filter to check against
     } else {
         return true;
     }
 }