public static function checkAndSanitize($field, $input, $flags = 0, array $options = null)
    {
        $checkedInput = self::check($field, $input, $options);
        if($checkedInput !== false)
            return $checkedInput;

        return self::sanitize($field,$input,$flags);
    }
public static function checkAndSanitize($field, $input, $flags = 0, array $options = null)
    {
        $checkedInput = self::check($field, $input, $options);
        if($checkedInput !== false)
            return $checkedInput;

        return self::sanitize($field,$input,$flags);
    }
public static function checkAndSanitize ( $ field , $ input , $ flags = 0 , array $ options = null ) { $ checkedInput = self :: check ( $ field , $ input , $ options ) ; if ( $ checkedInput !== false ) return $ checkedInput ; return self :: sanitize ( $ field , $ input , $ flags ) ; }
Checks the input and if it is not valid it tries to sanitize it.

@param string $field all fields check and/or sanitize supports
@param mixed  $input
@param int    $flags   see `sanitize()` for details
@param array  $options see `check()` for details
@return mixed|false
Checks the input and if it is not valid it tries to sanitize it .