0

Question: How can I have angular check this case for validation?

When you have angular validation and type in a valid string into an input tag/box, styled with bootstrap, the validation accepts it. Once you click the 'x' button on the right of the input box to clear it, angular still thinks it is valid. My project has angular and bootstrap included, but for the case of example I'm going to use w3schools for easier running.

To test it out: http://www.w3schools.com/angular/tryit.asp?filename=try_ng_validate_required

Second link example: huei90.github.io/angular-validation/

Picture examples: All pictures with errors


Pictures explained: The top picture is of w3schools and it saying valid even with nothing there. The next picture is what the error forum should look like, but upon clicking the 'x' in the red circle (with valid contents); the third picture occurs.

Thanks for all the help! Hopefully it is explained enough

DevilGale
  • 61
  • 5
  • Sorry, but where did "x" come from? – Sergey Goliney Jul 29 '16 at 14:36
  • 1
    @SergeyGoliney The "x" button is an IE-only "feature". DevilGale: There is more in the world that IE :) see [here](http://stackoverflow.com/questions/14007655/remove-ie10s-clear-field-x-button-on-certain-inputs) for a possible solution; if you want the clear functionality, you should implement it within Angular, not rely on the "features" of a single product. – Nikos Paraskevopoulos Jul 29 '16 at 14:40
  • @NikosParaskevopoulos Thanks, your link was exactly what I needed. I didn't know the 'x' was only for IE since my workplace only allows that browser. – DevilGale Jul 29 '16 at 14:56
  • 1
    I feel sorry for you :) To be fair, [here](https://github.com/angular/angular.js/issues/11193) is the relevant bug in Angular; it seems that the "x" is working for most of the other frameworks, at least as seen [here](http://todomvc.com/). Glad to have helped though. – Nikos Paraskevopoulos Jul 29 '16 at 15:00

0 Answers0