This is a migrated thread and some comments may be shown as answers.

Editor following Html5 form validation

6 Answers 145 Views
Wrappers for React
This is a migrated thread and some comments may be shown as answers.
Ruud
Top achievements
Rank 1
Ruud asked on 21 Jan 2020, 09:51 AM

Hi,

I'm currently building a form which includes some basic text inputs and a RTF editor. I use the KendoReact Editor to offer the cool control with nice copy and paste and formatting options.

I understand from your documentation that this control does not support Html5 form validation. In particular, I need to make this rte field required. As the rest of the form follows the html5 form validation (with all the nice UI hints if you try to submit) I'm looking for a way to accomplish the same with the Editor control. Has anyone accomplished this before?

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 22 Jan 2020, 08:25 AM

Hello, Ruud,

Currently, this can be achieved by programmatically checking the Editor content and setting class name that will make it look invalid.

I made an example that will add the invalid when to the Editor when in it empty on a button click:

https://stackblitz.com/edit/react-ah55ht?file=index.html

I hope this proves helpful.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ruud
Top achievements
Rank 1
answered on 22 Jan 2020, 02:31 PM

Hi Stefan,

Thanks for your quick reply. I do know how to add classes and prevent submission of the form via a custom method; but i would like to use this control the same as the input, where a Required attribute on the input tag is enough for the html5 validation to work, which includes the validation messages and will prevent the form submission as well.

I read this is not supported by the Editor control, so i was just wandering if there is a work around. I guess for now I need to stick to my current approach.

Regards,

Ruud

0
Accepted
Stefan
Telerik team
answered on 23 Jan 2020, 11:20 AM

Hello, Ruud,

Thank you for the feedback.

I discussed this with the Editor lead developer and the Form developer. We have some ideas in mind and we may be able to offer a nicer integration between the Editor and Form.

As our planning is dynamic, we will have this in mind, and when we have an official result, I will post it here.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ruud
Top achievements
Rank 1
answered on 23 Jan 2020, 12:03 PM

Hi Stefan,

That would be great, I really appreciate the way you guys are thinking with your user base in mind. Thanks!

Regards,

Ruud

0
Sanjay
Top achievements
Rank 1
answered on 03 Apr 2020, 02:54 PM

Hi Stefan,

 

 

We want to know whether there is any update with the required property for Editor control.

 

Regards,

Sanjay

0
Stefan
Telerik team
answered on 06 Apr 2020, 07:02 AM

Hello, Sanjay,

Currently, the required property is still not added.

We are working on tasks based on community interest and priority.

Thank you for sharing your interest in this as it will increase its priority.

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Wrappers for React
Asked by
Ruud
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Ruud
Top achievements
Rank 1
Sanjay
Top achievements
Rank 1
Share this question
or