Boolean: hardcode isValid for true/false

Not perfect, but should do the job unless we move to better forms

fixes #690
This commit is contained in:
Thomas Gelf 2017-07-13 10:38:06 +02:00
parent da01c65b8b
commit b11c6b9f34
1 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,15 @@ class Boolean extends ZfSelect
return null; return null;
} }
public function isValid($value, $context = null)
{
if ($value === 'y' || $value === 'n') {
return true;
}
return parent::isValid($value, $context);
}
/** /**
* @param string $value * @param string $value
* @param string $key * @param string $key