Skip to content

Loading…

Request/Suggestion #278

Closed
omaroman opened this Issue · 2 comments

3 participants

@omaroman

It would be nice to have a predefined html element such a <span> where error messages are displayed so that you can place that <span> or whatever element in front, back, top or down (or wherever) of a <input> element.

It also would be useful to specified the rules in a HTML5 Custom Data Attribute, e.g., data-validate or data-rules

Example:

<div class="field">
<label>email</label>
<input type="text" data-validate="{required:true,email:true,messages:{'email':'Invalid email address', 'required':'Required'}}" id="author_email" name="author.email" value="">
<span id="author_first_name_error" class="hasError"></span>
</div>

Last, but not least, this plug-in is awesome!!!

@bcamp1973

bump

re: using data attribute

@mlynch

Thanks. You can control the position of an error label using the errorPlacement or using errorContainer/errorLabelContainer. The data-attributes request is noted, thanks!

@mlynch mlynch closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.