Example #1
0
 /**
  * Return whether the given values (possibly incomplete) are valid
  *
  * Unsets all empty text-inputs so that they are not being validated when auto-submitting the form.
  *
  * @param   array   $formData
  *
  * @return type
  */
 public function isValidPartial(array $formData)
 {
     foreach (array('by_name', 'new_user', 'new_user_password', 'new_user_2ndpass') as $elementName) {
         if (isset($formData[$elementName]) && $formData[$elementName] === '') {
             unset($formData[$elementName]);
         }
     }
     return parent::isValidPartial($formData);
 }