the following input box is accepting lowercase and display error message 
when PAN Number is invalid.
But the requirement is when typing pan number, it should convert lowercase 
into uppercase.
ng-pattern="/[A-Z]{5}\d{4}[A-Z]{1}/i"  is not allowing the text to convert 
uppercase.
so how to convert characters into uppercase when typing with ng-pattern?


                     <div class="col-sm-3">
                                <div class="form-group" 
ng-class="{'has-error' : userForm1.panNo.$invalid && 
(userForm1.panNo.$dirty || submitted)}">
                                <label for="">PAN<span 
style="color:red">*</span></label>
                                    <div class="input-group">
                                        <span class="input-group-addon"> <i 
class="glyphicon glyphicon-sort-by-order"></i></span>
                                       <input style="font-weight:normal;" 
type="text" id="" name="panNo" class="form-control" ng-model=""  
 ng-pattern="/[A-Z]{5}\d{4}[A-Z]{1}/i"  maxlength="10" placeholder="Enter 
PAN Number" required />
</div>
<p ng-show="userForm1.panNo.$error.required && (userForm1.panNo.$dirty || 
submitted)" class="help-block">Please Enter PAN Number</p>
<p ng-show="userForm1.panNo.$error.pattern && (userForm1.panNo.$dirty || 
submitted)" class="help-block">PAN No. Should be only numbers and Uppercase 
Letters.</p>
</div>
</div>
    

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to