Add validation class to validate error message.