Editor following Html5 form validation

7 posts, 1 answers
  1. Ruud
    Ruud avatar
    63 posts
    Member since:
    Oct 2012

    Posted 21 Jan Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    2959 posts

    Posted 22 Jan Link to this post

    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
  3. Ruud
    Ruud avatar
    63 posts
    Member since:
    Oct 2012

    Posted 22 Jan in reply to Stefan Link to this post

    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

  4. Answer
    Stefan
    Admin
    Stefan avatar
    2959 posts

    Posted 23 Jan Link to this post

    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
  5. Ruud
    Ruud avatar
    63 posts
    Member since:
    Oct 2012

    Posted 23 Jan in reply to Stefan Link to this post

    Hi Stefan,

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

    Regards,

    Ruud

  6. Sanjay
    Sanjay avatar
    12 posts
    Member since:
    Apr 2020

    Posted 03 Apr Link to this post

    Hi Stefan,

     

     

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

     

    Regards,

    Sanjay

  7. Stefan
    Admin
    Stefan avatar
    2959 posts

    Posted 06 Apr Link to this post

    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.
Back to Top