Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

min/max input validation is against $modelValue, not $viewValue #12761

Closed
@edzius

Description

@edzius

Hi,

I am using ngModelController.$parsers/$formatters pipeline to do the number conversion and default min/max validators. My problem is that validation is done against $modelValue. So in my case when i enter value that is still valid in view validators reports it is invalid in model.

I want to propose to do default (min/max/etc.) validation on $viewValue. This way input limitations applied by browser would match validators rules.

I've made plunker to ilustrate: http://plnkr.co/edit/1IOnf9HYjgHhvpD0QsI3?p=preview

Cheers,
Edvinas

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions