hvrdhn88
Giga Patron

can you paste your full script?

 

adding thread here. kindly refer that.

 

https://community.servicenow.com/community?id=community_question&sys_id=e7828721dbd8dbc01dcaf3231f96...

MReddy
Tera Contributor

Could younhelp on this scenario

Here am getting alert msg but g_form msg not triggering 

if (!/^[a-z]+$/.test(newValue))
///^[0-9*#+]+$/

{
alert(" name should be lower case ");
g_form.showErrorBox('u_name', 'name should be lower case',false);
g_form.showFieldMsg('u_name', 'name should be lower case','info',false);
g_form.clearValue('u_name');
}

try Clearing the value first and then display error message then it will work. try in this format.

 

g_form.clearValue('u_name');

g_form.showFieldMsg('u_name', 'name should be lower case', 'info');

 

Not applicable

moving clearValue before showFieldMsg fixed my problem, thanks heaps

worked for me as well