Validations for a ruby object