rsaenen / ngx-custom-validators

Angular custom directives for validation
129 stars 53 forks source link

NGX-CUSTOM-VALIDATOR **NOT WORK** After Upgrade Angular Version #60

Open kuth-chi opened 3 years ago

kuth-chi commented 3 years ago

IMPORTANT: After I have upgrade Angular CLI version from 11 to 12 There are issue below ` -``` _Namespace '"***/node_modules/ngx-custom-validators/node_modules/@an gular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

4257 static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<ɵInternalFormsSharedModule, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor, t ypeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioContro lValueAccessor, typeof NgControlStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof Checkb oxRequiredValidator, typeof EmailValidator], never, [typeof ɵNgNoValidate, typeof NgSelectOption, typeof ɵNgSelectMultipleOption, typeof DefaultValueAccessor, typeof NumberValueAccessor, typeof RangeValueAccessor, typeof CheckboxControlValueAccessor, typeof SelectControlValueAccessor, typeof SelectMultipleControlValueAccessor, typeof RadioControlValueAccessor, typeof NgCo ntrolStatus, typeof NgControlStatusGroup, typeof RequiredValidator, typeof MinLengthValidator, typeof MaxLengthValidator, typeof PatternValidator, typeof CheckboxRequiredValidator, typeof EmailValidator]>; ?_

4258 static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<ɵInternalFormsSharedModule>;`

Ngx-Custom-Validator version 11.0.1

Expected/desired behavior

Environment information

Other information

mvdcreativo commented 3 years ago

What I did in the meantime to not update the library to ng12 was to update the library's own package.json: "@angular/common": "~12.1.1", "@angular/compiler": "~12.1.1", "@angular/core": "~12.1.1", "@angular/forms": "~12.1.1", "@angular/platform-browser": "~12.1.1", "@angular/platform-browser-dynamic": "~12.1.1",

"peerDependencies": { "@angular/common": "~12.1.1", "@angular/core": "~12.1.1", "@angular/forms": "~12.1.1" },

Run npm install and it worked

davifsroberto commented 3 years ago

it worked here: https://stackoverflow.com/questions/68220000/how-to-fix-ngx-custom-validator-in-angular-12/68746402#68746402