iegorov
11/1/2016 - 7:09 AM

Input-wrap example

Input-wrap example

//- --- MESSAGE ---
.input-wrap
  textarea.input-wrap__input(
    id="jobResponseInlineFormDesctiption"
    name="message"
    ng-model="vm.myResponse.message"
    ng-change="vm.hideServerValidationError('message')"
    autosize
    ng-minlength="10"
    ng-maxlength="255"
  )
  label.input-wrap__label.input-wrap__label--animated(
    focus-shift
    focus-to="jobResponseInlineFormDesctiption"
  ) Отзыв
  .input-wrap__iconwrap
    .input-wrap__icon.input-wrap__icon--validate
  div(
    ng-messages="jobResponseInlineForm.message.$error"
    ng-if="jobResponseInlineForm.message.$touched"
  )
    .input-wrap__error-message(ng-message="minlength")
      | Минимум 10 символов
    .input-wrap__error-message(ng-message="maxlength")
      | Максимум 255 символов
  div(
    ng-messages="vm.serverValidationError.message"
    ng-if="vm.showServerValidationError"
  )
    .input-wrap__error-message(ng-message="validation")
      | {{vm.serverValidationError.message.message}}