Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Set error and 'has-error' after form submitting. #97

Open
Luddinus opened this issue May 11, 2016 · 0 comments
Open

Set error and 'has-error' after form submitting. #97

Luddinus opened this issue May 11, 2016 · 0 comments

Comments

@Luddinus
Copy link

Hi.

Imagine I have a form where I insert a movie title.

I receive from the response this error JSON e.g:

{
   "errors": {
      "title": "The title must have between 4-32 characters"
   }
}

I see that there is a wrapper "bootstrapHasError", and I would like to insert the error message in the form and set active the 'has-error' class.

The wrapper is this but I dont know how to change things.

<div class="form-group" ng-class="{'has-error': showError}">
  <formly-transclude></formly-transclude>
</div>

What am I missing?

Thx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant