Skip to content
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

The bug! I want to decide it is own when and what I will to validate! #914

Closed
optimistex opened this issue Dec 8, 2017 · 1 comment
Closed

Comments

@optimistex
Copy link

I do setup option allowClear, but can't use it because the control becoming invalid when I have clear it.

public validate(c: FormControl): any {
let controlValue = c ? c.value : [];
if (!controlValue) {
controlValue = [];
}
return (controlValue.length > 0) ? null : {
ng2SelectEmptyError: {
valid: false
}
};
}

@optimistex
Copy link
Author

Fixed here: optimistex@b799bf0

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

No branches or pull requests

1 participant