gist validation and error alert