Validator class.