Validating recurrence section

2 posts, 0 answers
  1. Simon
    Simon avatar
    35 posts
    Member since:
    Mar 2016

    Posted 13 Mar Link to this post

    Wondering if you have code samples regarding validating different sections of the recurrence editor. For instance if the user selects a daily recurrence then deletes (using keyboard) the value in the "After" spinner or the "On" date/time picker. Or they do something similar with a Weekly recurrence and perhaps check none of "Repeat on" checkboxes and delete values for "After" or "On". 

    I see there is some reasonable default saved for RecurrenceRule in the database - is that by design as a way to avoid exhaustive validation? I can see this being a difficult ask, but it only takes one user to enter a recurring event incorrectly and it leads to a lot of confusion and questions. Is this a validation rabbit hole best avoided?

     

  2. Ianko
    Admin
    Ianko avatar
    1886 posts

    Posted 15 Mar Link to this post

    Hello Simon,

    Validating the way described really sounds quite complex. There is no specific reason for not having validation. As I can see, there is little that could go wrong. Generally, with such editing and event creation you can either add complex validation that would confuse end users more or enable them to actually have the output of their actions and correct afterwards. 

    If the user chooses to create a recurring event one will be created no matter what. It is difficult to somehow control how exact this events should be created and I imagine that going with a complex validation would actually lead to limitations. 

    However, you could try and create custom editor and add additional validation by following this sample here: https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/scheduler/scheduler-custom-editor. You can also see this article here: https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/editing/custom-edit-and-event-templates

    Regards,
    Ianko
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top