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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Validation message dissapearing

Thread ID:

Created:

Updated:

Platform:

Replies:

145631 Jul 1,2019 10:38 PM UTC Jul 5,2019 01:24 PM UTC JavaScript - EJ 2 3
loading
Tags: FormValidator
Adam Mews
Asked On July 1, 2019 10:38 PM UTC

Hi.

I have an listbox (non-syncfusion component) that stores some data. This data is then stored in a hidden multiselect component to be send to the controllers. This two components are located inside a tab in a Grid Edit Template Dialog.

When there is no data inside the listbox the validator shows up the message (see Fig1). But when i add one another and then remove it, the validation message does not appears (see Fig2). The validation is based in the multiselect component with their values.

I'm missing something here?

Obs: The images with the codes and behaviors are in the file


Attachment: FormValidator_Behavior_135340f8.zip

Prince Oliver [Syncfusion]
Replied On July 2, 2019 11:11 AM UTC

Hello Adam, 

Thank you for contacting us. 

We have checked you reported scenario in our end. We need more information to replicate the issue in our end. Kindly share us the complete code snippet of the Grid. This will help us provide a prompt solution. 

Regards, 
Prince 


Adam Mews
Replied On July 2, 2019 12:18 PM UTC

Hi Prince,

Thanks for your response.

The grid and the dialog template code snippet are inside the zip file. I shaed the whole code if you want some other part

Let me know if you gonna need something else.

Best,
Adam





Attachment: Code_Snippets_cdde59ed.zip

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On July 5, 2019 01:24 PM UTC

Hi Adam, 
 
Good day to you. 
 
We have checked your code example with provided screenshot and we suspect that you have changed the value for the EJ2 MultiSelect dynamically. But, our MultiSelect validated the value within the form in the focus out action which caused this issue. So, we suggest you validate the MultiSelect component in the change event as like in the below code example. 
 
// initialize MultiSelect component 
var listObj = new ej.dropdowns.MultiSelect({ 
    // set the placeholder to MultiSelect input element 
    placeholder: 'Favorite Sports', 
    // set the type of mode for how to visualized the selected items in input element. 
    mode: 'CheckBox', 
    change: onChange 
}); 
 
listObj.appendTo('#default'); 
 
var options = { 
    rules: { 
        default: { required: true } 
    } 
}; 
 
// Initialize the FormValidator. 
var formObj = new ej.inputs.FormValidator('#formId', options); 
 
function onChange(args) { 
    formObj.validate("default"); // To validate the Multiselect component 
} 
 
For your convenience, we have prepared the simple for MultiSelect with form validation and same can be found from below link, 
 
 
Could you please check the above sample and get back to us with more details if you still face the issue or need any further assistance on this? 
 
Regards, 
Vinoth Kumar S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon