We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried sf-options="{ pristine: {errors: false, success: false}}".
It comes in scope.options but the options are ignored. It still validates the input no matter if it is pristine or not.
I did a fix but I find it more like a workaround.
'has-error': form.disableErrorState !== true && hasError() && !ngModel.$pristine, 'has-success': form.disableSuccessState !== true && hasSuccess() && !ngModel.$pristine
The text was updated successfully, but these errors were encountered:
Could you please make a plunker or gist to demonstrate, it would help us a lot?
Sorry, something went wrong.
I added a demo: http://plnkr.co/edit/lYUgSKaW72vCm82G2dg1?p=preview
I set the pristine option according to https://github.com/json-schema-form/angular-schema-form/blob/development/docs/index.md.
The name is prefilled and is validated from the beginning. It is ignoring the pristine option.
Removing "|| !scope.ngModel.$isEmpty(scope.ngModel.$modelValue)" will fix the problem without using the global option.
scope.hasSuccess = function() { if (!scope.ngModel) { return false; } return scope.ngModel.$valid && (!scope.ngModel.$pristine || !scope.ngModel.$isEmpty(scope.ngModel.$modelValue)); };
Successfully merging a pull request may close this issue.
I tried sf-options="{ pristine: {errors: false, success: false}}".
It comes in scope.options but the options are ignored. It still validates the input no matter if it is pristine or not.
I did a fix but I find it more like a workaround.
'has-error': form.disableErrorState !== true && hasError() && !ngModel.$pristine, 'has-success': form.disableSuccessState !== true && hasSuccess() && !ngModel.$pristine
The text was updated successfully, but these errors were encountered: