Skip to content

Instantly share code, notes, and snippets.

@johnschimmel
Created March 15, 2013 11:29
Show Gist options
  • Save johnschimmel/5169233 to your computer and use it in GitHub Desktop.
Save johnschimmel/5169233 to your computer and use it in GitHub Desktop.
Redisplaying html form with user input and form validation using MongooseJS
<label for="thenamebox">
{{#errors.name}}
<span class="help-block alert alert-error">{{type}}</span>
{{/errors.name}}
Name <input type="text" name="name" id="thenamebox" value="{{astro.name}}" required>
</label>
<label for="birthdate">
{{#errors.birthdate}}
<span class="help-block alert alert-error">{{type}}</span>
{{/errors.birthdate}}
Birthdate <input type="date" name="birthdate" id="birthdate" value="{{astro.birthdate}}">
</label>
<!-- add all the other form fields you'll need -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment