Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Added option to modify e-mail validation message with jqBootstrapValidation #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions exampleSite/config.toml
Expand Up @@ -80,6 +80,7 @@ theme = "hugo-freelancer-theme"
[params.contact.form.email]
text = "Email Address"
error = "Please enter your email address."
invalid = "Not a valid email address."

[params.contact.form.phone]
text = "Phone Number"
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/contact.html
Expand Up @@ -20,7 +20,7 @@ <h2>{{ with .Site.Params.contact.title }}{{.}}{{ end }}</h2>
<div class="row control-group">
<div class="form-group col-xs-12 floating-label-form-group controls">
<label>{{ with .Site.Params.contact.form.email.text }}{{.}}{{ end }}</label>
<input type="email" name="_replyto" class="form-control" placeholder="{{ with .Site.Params.contact.form.email.text }}{{.}}{{ end }}" id="email" required data-validation-required-message="{{ with .Site.Params.contact.form.email.error }}{{.}}{{ end }}">
<input type="email" name="_replyto" class="form-control" placeholder="{{ with .Site.Params.contact.form.email.text }}{{.}}{{ end }}" id="email" required data-validation-required-message="{{ with .Site.Params.contact.form.email.error }}{{.}}{{ end }}" data-validation-validemail-message="{{ with .Site.Params.contact.form.email.invalid }}{{.}}{{ end }}" >
<p class="help-block text-danger"></p>
</div>
</div>
Expand Down