custom form control custom client side validation in Kentico

Anthony Butcher asked on February 14, 2018 15:51

We've created a custom FormEngineUserControl to capture date input using 3 text inputs for day/month/year.

On the server we override the bool IsValid() method which works fine and displays the error message if invalid.

However we want to use client side validation also, we can use a CustomValidator control and assign a ClientValidationFunction to call a JS method however this is not then combined with the server validation function and we end up with two validation messages, one that removes when client validation passes, and one that only disappears when the form is re-submit, basically rendering the client validation useless.

Is there no way to register a client validation method with a custom form control? that will then be combined with the server method and error label etc?

Also I posted this to stack overflow tagged against Kentico thinking it would be integrated here but it seems they are two different systems? If that's not the case then I apologise for the double post.

Recent Answers


Michal Samuhel answered on February 14, 2018 20:44 (last edited on February 15, 2018 09:24)

Hi Anthony, I have replied to SO post directly:

https://stackoverflow.com/questions/48789959/custom-form-control-custom-client-side-validation-in-kentico

Also there should be an integration in place and any SO post with Kentico tag should be also here. It seems that this might be disabled right now or there might be an error. We will work on this with my colleagues so that integration is back up and running.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.