We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

validate on Focus ejMaskEdit

Thread ID:





125654 Aug 31,2016 11:26 AM UTC Sep 1,2016 01:23 PM UTC JavaScript 1
Tags: ejMaskEdit
Asked On August 31, 2016 11:26 AM UTC

 I use a ejMaskEdit. I would like to make a validation using jQuery validation but on the outfocus ejMaskEdit. And not on a button click in a form.
There are examples with grids.
Could you give me an example to better understand the syntax.
Thank you

<Script type = "text / javascript">

.validator.setDefaults $ ({
ignore []
focusOut: function (element) {
$ (Element) .Valid ();
errorClass: e-validation-error '
errorPlacement: function (error, element) {
$ (Error) .insertAfter (element.closest () "e-widget.");

$ ( "# MaskEdit"). EjMaskEdit ({
name: "mask"
inputMode: ej.InputMode.Text,
ValidationRules: {
required: true

ValidationMessage: {
required: "Required value"
width: "120px"
// MaskFormat "",
}); // MaskEdit

</ Script>
Google Traduction pour les entreprises :Google Kit du traducteurGadget Traduction

Karthik Ravichandran [Syncfusion]
Replied On September 1, 2016 01:23 PM UTC

Hi Bertrand,

Thanks for contacting Syncfusion support,
We have analysed your query. We would like to inform you that, the validation occurs on every keyup events in jQuery. It is the default functionality of jQuery validation. We can add the validation for MaskEdit control, please refer the below code snippet 
    validationRules: { required: true }, 
    validationMessage: { required: "Required value" }, 
    inputMode: ej.InputMode.Text, 
    value: "4242422424", 
    maskFormat: "99 999-99999", 
    width: "100%" 
For your convenience we have prepared the sample and it can be available in below link

Please let us know if you have any concerns 
Karthik R



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon