Adding validation class and rules.