ember-intl / cp-validations

ember-intl support for ember-cp-validations
MIT License
10 stars 13 forks source link

Optionally allow for HTML in validation errors #15

Open jasonmit opened 7 years ago

jasonmit commented 7 years ago

Currently we always go through intl.formatMessage where in the future we likely want to conditionally call intl.formatHtmlMessage based on some flag.

import { validator, buildValidations } from 'ember-cp-validations';

const Validations = buildValidations({
  username: validator('presence', {
    presence: true,
    is_html: true,
    descriptionKey: 'key.for.username'
  })
});