add validate class
test required and optional options
implement optional and required options