Add required attribute
Please add required attribute also. Its hard to add manually.
Can you please provide code how you added manual validation on this?
yeah,, I am adding dynamic styles using [ngClass]
1st step: you have to add this to your ng-select elemet => [ngClass]="{'ng-select-required':myModel.myItemID==0 }"
2nd step: you have to create style like this =>
.ng-select-required > div > div > span { border-left:solid 3px red !important; }
note: since these people have not exposed any property for required attribute of the input field,so we have to tweak it little bit, what I have done above is adding dynamic style to the 'span'
Thanks a lot for the workaround Vsanat, it helped me out :) But I think the required class definition should be .ng-select-required div > div > span { border-left:solid 3px red !important; } There was an extra ng-select I think.
Yeah you are right.. removed that :)
thanks for the solutions!! It was great for me, but could you post the same solution for multiple ng2-select option?
Hi vsanat, I am facing same issue, can you share HTML tag. am trying to implement your code but somehow it's not working. Thanks for your help.