Text box should start with '_'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 04:57 AM
Hi All,
I have a requirement of placing a validation in the text box,
It should start with '_A' , If not it should throw as error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 06:34 AM
Ya thanks i did it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 06:36 AM
Hi All,
I did find a easy way to do it as well,
To check whether the textbox starts with some requested characteron SR
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue.indexOf('-A') != 0){
alert('Please prefix with -A');
g_form.setValue('check','');
}
}
Please mark it if found helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:17 AM
Hi Mohammed,
Is your query solved? if yes pls mark the reply as Correct so that the thread is closed.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 04:14 AM
Hi Mohammed,
Can you mark the answer as correct? This helps in closing out the thread
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 04:37 AM
He will when he will. Posting 3 times specifically requesting an answer to get marked is a bit much.