Property 'validate' does not exist on type 'JQuery<HTMLElement>'

Viewed 285

After upgrading Angular 8 to 9, got errors when run the system in localhost.

ERROR in src/app/auth/_helpers/login-custom.ts:6:12 - error TS2339: Property 'validate' does not exist on type 'JQuery'.

6       form.validate({
             ~~~~~~~~
src/app/auth/_helpers/login-custom.ts:17:17 - error TS2339: Property 'valid' does not exist on type 'JQuery<HTMLElement>'.

17       if (!form.valid()) {
                   ~~~~~
src/app/auth/_helpers/login-custom.ts:82:12 - error TS2339: Property 'validate' does not exist on type 'JQuery<HTMLElement>'.

82       form.validate({
              ~~~~~~~~
src/app/auth/_helpers/login-custom.ts:102:17 - error TS2339: Property 'valid' does not exist on type 'JQuery<HTMLElement>'.

102       if (!form.valid()) {
                    ~~~~~
src/app/auth/_helpers/login-custom.ts:113:12 - error TS2339: Property 'validate' does not exist on type 'JQuery<HTMLElement>'.

113       form.validate({
               ~~~~~~~~
src/app/auth/_helpers/login-custom.ts:121:17 - error TS2339: Property 'valid' does not exist on type 'JQuery<HTMLElement>'.

121       if (!form.valid()) {
                    ~~~~~
0 Answers
Related