- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 05:19 AM
Hi All,
I see gs.include('validators') being used in inbound email actions, also could see that it relates to a script include- validators that has three functions isnumeric, isInteger and containsOnlyChars defined it.
But unable to figure out what it is for and what exactly is it doing. Any suggestion please
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 05:27 AM
Allows you to validate the data coming in when you script is looking for input. Things like isNumeric, or isInteger or containsOnlyChars
Example is on Priority check:
if (email.body.priority != undefined && isNumeric(email.body.priority))
isNumeric is checked in the script includes - validators - to make sure it's a number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 05:26 AM
Hello Sohan,
gs.include() is used to call a script include.
In this case its calling the script include called 'validators'.
And as per the description of the above script include it is used for 'validation scripts for validating the type of text and whatnot'.
If this reply assisted you, please consider marking it Correct, Helpful, or Like it.
This helps other customers to learn from your thread.
Thanks,
Abhishek

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 06:11 AM
gs.include() is an outdated mode of calling a script include. It hasn't been required for several years. When you see it, I suspect you are looking at some very old code. Script includes are automatically loaded on demand.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 05:27 AM
Allows you to validate the data coming in when you script is looking for input. Things like isNumeric, or isInteger or containsOnlyChars
Example is on Priority check:
if (email.body.priority != undefined && isNumeric(email.body.priority))
isNumeric is checked in the script includes - validators - to make sure it's a number.