Entity Validator failing Integer for not being integer
You can add constraints to entities, fields or properties. You get then an entity, field object (FieldItemList) or a value to validate. So if you want to check the field value use FieldConfigInterface::addPropertyConstraints:

-&gt;addPropertyConstraints('value', ['Range'=&gt; ['min' =&gt; 0]])