Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Need to create alert in DCR's.
AmanBhateja
I have a DCT with a field as below:
required="f" maxlength="300"/>
When i enter an invalid value,for example a "*"
Instead of showing the message attached in attachment.
I should pop up a alert message with the message:
Invalid value.
Please let us know how this can be done.
Find more posts tagged with
Comments
Rick Poulin
I question the user-friendliness of the alert box here, but I'll just assume you have a good reason for it. Use an onItemChange handler, which does
if (!iwItem.getValue().match(iwItem.getRegex())) {
alert("Invalid Value");
}
That assumes you're using validation-regex in your DCT, but you could do similar for validating non-blank, or content length.
s1.PNG
Migrateduser
I have to agree with Rick here. The vpath regex is the right way to go here. You should use onSave handlers for validations only if regular expressions do not work.