simple form validation provide validate format and return result