Validator is a simple way to validate a property or an object.