Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why error message is not shown
Message
From
12/09/2016 02:54:47
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01640697
Message ID:
01640708
Views:
54
>Hi everybody,
>
>I can not figure out why this simple code is not working - when I type a number bigger than max, I can see the red border, but the error message is not shown instead of the label
>
>
><ng-form name="editPaDSSForm">
>    <div class="form-horizontal">
>        <div class="row">
>            <div class="form-group">
>                                
>                <div class="col-xs-6">
>                    <label class="control-label" 
>                           ng-hide="(form.editPaDSSForm.maxDaysLocal.$error.max || form.editPaDSSForm.maxDaysLocal.$error.min) && form.editPaDSSForm.maxDaysLocal.$dirty" 
>                           title="@Messages.maxAgeLocalSalespoint">@Messages.maxAgeLocalSalespoint</label>
>                    <label class="field-validation-error control-label-error animate-show" 
>                           ng-show="(form.editPaDSSForm.maxDaysLocal.$error.max || form.editPaDSSForm.maxDaysLocal.$error.min) && form.editPaDSSForm.maxDaysLocal.$dirty">
>                        @String.Format(Messages.mustBeBetweenXandY, Messages.maxAgeLocalSalespoint, "1", "45")
>                    </label>        
>                    <input type="number" name="maxDaysLocal" 
>                           id="maxDaysLocal"
>                           min="1" max="45"
>                           ng-model="currentPrefs.loclccdays"
>                           class="form-control"
>                           placeholder="0"
>                           sm-focus
>                           data-sm:number-format data-sm:number />
>                </div>                    
>            </div>   
>                
>        </div>
>    </div>
></ng-form>
Shouldn't you be using 'ng-min' / 'ng-max' attributes for input ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform