Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Abide] Separating out error messages #10799

Closed
thisispax opened this issue Dec 6, 2017 · 0 comments · Fixed by #11698
Closed

[Abide] Separating out error messages #10799

thisispax opened this issue Dec 6, 2017 · 0 comments · Fixed by #11698

Comments

@thisispax
Copy link

It would be great to separate error messages e.g. for an empty required field vs a field filled with invalid data.

Something like that:

<label>
    Amount
    <div class="input-group">
      <span class="input-group-label">$</span>
      <input class="input-group-field" id="exampleNumberInput" type="number" required pattern="number"/>
    </div>
    <span class="form-error" data-form-error-for="exampleNumberInput" data-form-pattern="required">Amount is required.</span>
    <span class="form-error" data-form-error-for="exampleNumberInput" data-form-pattern="number">Amount should be a number.</span>
</label>
soylent added a commit to soylent/foundation-sites that referenced this issue Feb 24, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
soylent added a commit to soylent/foundation-sites that referenced this issue Feb 24, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
soylent added a commit to soylent/foundation-sites that referenced this issue Feb 24, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
soylent added a commit to soylent/foundation-sites that referenced this issue Feb 24, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
@DanielRuf DanielRuf added this to Planning and Organizing in Foundation V7 Oct 6, 2019
soylent pushed a commit to soylent/foundation-sites that referenced this issue Oct 7, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
soylent pushed a commit to soylent/foundation-sites that referenced this issue Oct 8, 2019
Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes foundation#10799
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Foundation V7
Planning and Organizing
Development

Successfully merging a pull request may close this issue.

3 participants