3
* BooleanValidator.class.php
5
* This file contains the definition of the BooleanValidator class.
8
* @author John Diamond <jdiamond@solid-state.org>
9
* @copyright John Diamond <jdiamond@solid-state.org>
10
* @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
17
* @author John Diamond <jdiamond@solid-state.org>
19
class BooleanValidator extends NumberValidator
22
* Validate a Boolean Field
24
* @param string $data Field data
25
* @return string This function may alter data before validating it, if so this is the result
26
* @throws FieldException, FieldSizeException
28
public function validate( $data )
30
return (boolean) $data;
b'\\ No newline at end of file'