开发者

validate int which exceeds PHP_INT_MAX value (2147483647) in zend framework

Any workaround to validate an int field which exceeds PHP_INT_MAX (2147483647 on 32 bit) value? The code I am using in Zend framewo开发者_StackOverflow社区rk is:

'int_input' => array(
        'allowEmpty' => true,
        'Zend_Validate_Int',
        array('Zend_Validate_Between',0,4000000000),
        'message' => 'Int must be between 1 and 4,000,000,000.'
    )

Thanks.


Technically no, because it's not a PHP Integer if it's out of bounds.

But you can use Zend_Validate_Digits with Zend_Validate_Between to make sure the passed value is a number in a specific range though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜