implement validator on set