exported validator to top library and added example (broken)