add form validation

Fixed #11