Custom vs Remote Validation

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    1 posts
    Member since:
    Jan 2020

    Posted 20 Apr 2020 Link to this post

    What is the difference between custom validation on grid and the Remote validation? What would be the use-case for Remote over custom validation? Is one for server-side only?
  2. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    1081 posts

    Posted 22 Apr 2020 Link to this post

    Hi, Jeremy,

    Indeed the custom validation is only on the client-side. It provides a way to extend the built-in rules with custom ones like the demo example we have for the ProductName starting with a capital letter. This is checked on the client and is triggered as soon as the input is blurred.

    In contrast the remote validation is also a custom rule so to speak, however, it posts the values to the server with an ajax request and in accordance with the response - the grid displays the valid or invalid state, but the validation is performed on the server side, most frequently used for checking for duplicates in an existing database or other information that cannot be inferred without a check with the server side.

    https://demos.telerik.com/aspnet-mvc/grid/editing-remote-validation

    https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/how-to/editing/using-remote-validation-in-grid

    Regards,
    Alex Hajigeorgieva
    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