public static function PositiveIntegerPropertyType::validate in Entity Construction Kit (ECK) 7.3
Validate.
Overrides IntegerPropertyType::validate
File
- ./
eck.property_type.inc, line 433 - Property types.
Class
Code
public static function validate($value) {
if (parent::validate($value)) {
// Lets cast it in case it is string.
$int = intval($value);
if ($int >= 0) {
return TRUE;
}
}
return FALSE;
}