Home>Support>Field validation

Field validation

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

How to validate field in siteorigin custom widget like add required attributes and characters limit validation.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 4 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Ravikumar,

    You’re able to add additional sanitization for your widget by adding a sanitize_date method to your widget class. For more information, please click here.

    Kind regards,
    Alex

  2. 4 years, 6 months ago Ravikumar

    Hi Alex,

    Thanks for the reply. I need client side jQuery validation before closing the widget. Like after filling all the fields and while clicking the done button or close icon in the widget I need to validate text fields are filled or empty as well as characters limit and show popup alert fields are mandatory and characters limits also.

  3. 4 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Ravikumar,

    We don’t provide a public method for doing this so you’ll need to manually implement this – we rely on server side validation. You can implement checks by detecting either change field changes or a click check on the save/done buttons.

    Kind regards,
    Alex

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More