Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Invalid styles should take ng-touched in consideration #127

Closed
Raisolution opened this issue Jan 16, 2017 · 2 comments
Closed

Invalid styles should take ng-touched in consideration #127

Raisolution opened this issue Jan 16, 2017 · 2 comments
Assignees

Comments

@Raisolution
Copy link

Currently we only check ng-invalid e.g. .k-textbox.ng-invalid, when applying the styles, which results in displaying the invalid styling on initial form load. Maybe we should consider checking both invalid and touched states (not sure about pristine)?

cc @rusev @ggkrustev @tsvetomir

@gyoshev
Copy link
Contributor

gyoshev commented Jan 19, 2017

Seems like a good idea in our current editing demo, when form posting is disabled when the form is invalid. My only concern is that there is no indication that the form is invalid, if it is submitted without touching any of the fields. Clicking Save in the example below will not indicate that the form is not valid:

image

See this plunkr snippet and try to add a new record. Should we support this scenario, or is disabling the submit button the better UX? Ideally, clicking submit in that scenario should mark the inputs as invalid, and show the validation messages. Is that possible with the Angular validation?

@gyoshev
Copy link
Contributor

gyoshev commented May 30, 2017

Since the Angular documentation recommends looking at these properties, the above scenario seems irrelevant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants