add #validate and #error_messages