leading zeros missing within number input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2016 09:36 PM
Hello
Can some one help in my issue.
When using the element as a numberfield, leading zeros (e.g. 011) are removed even if the number entered does not break the validation rules (e.g. min, max). Is there an attribute to force the zero to remain in the field after it loses focus?
eg.,
<span ng-switch-when="number">
<div ng-form="form1" ng-class="{'has-error': form1.name.$error.maxlength}">
<input type="number" name="name" ng-class="{'form-control-success':columnObj.value > 0 }" ng-maxlength="10" ng-minlength="6" pattern="[0-9]*" class="form-control" ng-model="columnObj.value" " />
</div>
<div style = "color: red;" ng-show='!form1.name.$valid' > Please select a 6-10 digit number.</div>
</span>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2016 11:24 PM
try this,
<input type="text" name="number" pattern="/[0-9]*.{6,10}"
maxlength="10" title="digit min 6 and max 10 digits">
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2016 11:32 PM
Not working nayan,
thanks
Saranya