I want that my quantity[field name] must be zero(0) or positive
I define following rules in my model.
public function rules()
{
return [
[['quantity'], 'integer', 'min' => 0],
[['quantity'], 'integer', 'max' => 1000000],
];
}
And it is working properly. And display error message when i try to enter negative value .
But The Problem is it accept -0 [ minus zero ]
How to restrict user to do not enter -0 ?
Thanks