Location: PHPKode > projects > Neobill > NeoBill0.5.6/solidworks/validators/IntValidator.class.php
<?php
/**
 * IntValidator.class.php
 *
 * This file contains the definition of the IntValidator class.
 *
 * @package SolidWorks
 * @author John Diamond <hide@address.com>
 * @copyright John Diamond <hide@address.com>
 * @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
 */

/**
 * IntValidator
 *
 * @package SolidWorks
 * @author John Diamond <hide@address.com>
 */
class IntValidator extends NumberValidator {
	/**
	 * Validate an Integer Field
	 *
	 * Integers must be numerical and within the specific range.  Any decimal component
	 * is rounded off (does not generate any error as long as it is within range).
	 *
	 * @param string $data Field data
	 * @return string This function may alter data before validating it, if so this is the result
	 * @throws FieldException, FieldSizeException
	 */
	public function validate( $data ) {
		return intval( parent::validate( $data ) );
	}
}
?>
Return current item: Neobill