Author Topic: Validation alert  (Read 2637 times)

rallesaid

  • Newbie
  • *
  • Posts: 16
    • View Profile
Validation alert
« on: September 08, 2016, 12:10:12 am »
It is possible that instead of the tooltip "required",


an alert "required" is displayed

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6178
    • View Profile
Re: Validation alert
« Reply #1 on: September 09, 2016, 08:58:43 pm »
Alert can be shown in validation callback.

rallesaid

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Validation alert
« Reply #2 on: September 09, 2016, 09:31:06 pm »
I resolve with this
//maxLen
{ type:function(ui){
                var value = ui.value;
                if(value.length > 50 ){
                    alert('some message');
                    return false;
                }
            }
        }

but I have other question.
when I put return false, the entered value is cleared, then I comment the line  //return false,the entered value remains in the cell but the alert is displayed 2 times,
how i can remain the entered value and return false?