-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty controls are invalid when a [required]="false" property is defined #5976
Comments
@frickt
|
@ericmartinezr this should work with binding to properties. And there is a Generally speaking we do prefer binding to properties. Currently the main use case for binding to attributes are: aria support and attributes one would like to add for styling |
Different implementation, I know, but I have been using the built in form validators for this. I like this approach since it enables me to manage all validators from a central location.
Working example here: http://www.syntaxsuccess.com/viewarticle/forms-and-validation-in-angular-2.0 |
Hi, I have the same problem, I'm setting |
If you want the
|
mh, at least in Chrome I see that |
For a conditional See comment: #6824 (comment) |
I use a 1 custom validator for both checkbox and text input now. Code snippets (exposeToFrontend is the checkbox, exposeUrl the text input):
|
Stumbled over this a couple of days ago. In my opinion this behavior perhaps should be reconsidered because it doesn't feel one hundred percent naturally. When applying Otherwise as soon as you add |
Coming from large angular1 projects, it's unacceptable, not to have a bindable [required] with working validation as pendant to ng-required. |
Same problem whit Material2 input on RC1. If required is at false and control says is not required, the field is still required. |
As far as I know currently attributes for validators Looks like a dup of #7393 |
I think, that is a showstopper for many of us migrating angular1 to angular2 - we can currently not implement all of our app logic. |
You can use model driven forms and add validators there with full control. |
Should have been fixed by #11116. |
Its not working for me any help? |
Angular 2 Form Validation Using Validators WIth An Element That Is Dynamically Built Using *ngIf }; |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
small example:
plnkr for alpha.54
http://plnkr.co/edit/nPlfg2uNAMYTkc5gBWTh?p=preview
The text was updated successfully, but these errors were encountered: