Validator class

Basic validation.