/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$.fn.uaEmail = function(options)
{
$.fn.extend(this,this.uaString(options));
this.
off(EV_CHECK_SPECIFIC_ERRORS).
on(EV_CHECK_SPECIFIC_ERRORS, function(ev)
{//check text length
ev.stopImmediatePropagation();
$(this).trigger(EV_CLEAR_ERRORS);
//nyes chars & not min charts?
if($(this).val().length < options.iMinChars)
{
$(this).trigger($.Event(EV_SET_ERROR_MSG,{uaData:{data:{msg:"This field is mandatory
You MUST have a minimum of " + options.iMinChars + " characters"}}}));
return;
};
//not an email ?
if (!(new RegExp(/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/).test($(this).val())))
{
$(this).trigger($.Event(EV_SET_ERROR_MSG,{uaData:{data:{msg:'Not a properly formated email'}}}));
return;
};//switch
});
return this;
};//nkTdDtGmail