Added constraints to User class.
Constraints are specified in _sql_constraints and the error messages are in _sql_error_messages.