fix synopsis as valid code
add spec for .validate (missing!)