0

I am doing input validation on Angular but it's fine for one field validation but how to do the code if i have more input fields.

Here is the my plunker: plnkr.co/edit/Z6RRhPvbZNdlG9S9YYTP?p=preview

Thanks in advance

1 Answer 1

1
<span ng-show="myform.$invalid">Please enter something!</span>
<span ng-show="myform.$valid">Good boy!</span>

http://plnkr.co/edit/YWukSlLNZInK7nYdgOLA?p=preview

Sign up to request clarification or add additional context in comments.

4 Comments

Second field have a minlength as 10 =) maybe that's why?
is it possible way can validate msg show for each field. now it's working as once finish the both inputs then it's valid..
plnkr.co/edit/YWukSlLNZInK7nYdgOLA?p=preview. If I understand you correctly...
above code you are hard coded the names for each input. As per my issue i need to use the one name only because it's comes through angular. this kind of fields will be many rows so can you give best solution for it. above validation is correct working for individual but don't like to declare more names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.