We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

FormValidator - Error in mounted hook: "TypeError: message is undefined"

I have an issue with FormValidator.
I have this error in the console : Error in mounted hook: "TypeError: message is undefined".

Where I cand define message ?

I use TypeScript.

Attachment: login_d2f47f0e.zip

1 Reply

PO Prince Oliver Syncfusion Team March 19, 2019 10:19 AM UTC

Hello Jean, 

Good day to you. 

On examining the shared code, we have noticed that you have not defined the validation rules for the Form validator in a proper format. We must give the validation rules as a key-value pair in a separate array for every input. We have modified the code for your reference, please find them below 

this.options.rules = { 
    Pseudo: { 
        required: true, 
        regex: ['^[a-zA-Z]+', '* Enter alphabetic characters only'] // If you wnat to give the error mesaage, you need to provide as the separate key value pair. 

We have modified your TS file and attached it in the below link for your convenience 

For further reference on the available validation rules for the Form validator, kindly refer the below documentation link. 

Please let us know if you need any further assistance on this. 


Live Chat Icon For mobile
Up arrow icon