Validate data by JS during register. Closes #25.