It is very much possible to do in Angular. So when there is an issue with
the input (ex: you entered a alphabet etc), then error class will be set
but in the plnkr you sent there is no CSS class called .error {}
If you are using Angular you can use
<div ng-class="{ 'form-control has-error': search.searchbox.$invalid }">
On Thu, Feb 6, 2014 at 3:16 PM, Varun Krishna Parthasarathy <
[email protected]> wrote:
> http://plnkr.co/edit/rnmD89xzUsuLbHUvDjHW?p=preview<http://www.google.com/url?q=http%3A%2F%2Fplnkr.co%2Fedit%2FrnmD89xzUsuLbHUvDjHW%3Fp%3Dpreview&sa=D&sntz=1&usg=AFQjCNErupDS_wHJJHeEBEVZ0ffXC8vOhQ>
>>
> check this.
>
> 1. I want to restrict the user to enter only numbers
> 2. the number should not be less that 16 and it should not be more
> than 16.
> 3. if the user enters a text or the number exceeds the 16 digit the
> border colour of the search box should turn red.
>
> Is this possible to do?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Regards,
Aadithya C Udupa
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.