import {
  validatePresence,
  validateFormat
} from 'ember-changeset-validations/validators'
import buildMessage from 'ember-changeset-validations/utils/validation-errors'

validations =
  nickname: validatePresence presence: true, message: (key, type) ->
    buildMessage t("attributes.user.#{key}"), type: type
  email: validateFormat type: 'email', message: (key, type) ->
    buildMessage t("attributes.user.#{key}"), type: type

export default validations

