add method setRules() to Validator class

setRules() method allows to set custom rules in the Validator object.