support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > isCOBOL General > Deployment > What can I use to perform an email validation during entry-field accept?
Question Title What can I use to perform an email validation during entry-field accept?

Starting from the 2013 R2 the regular expression is supported on entry-field control. The power of regular expression is now available also during entry-field accept. The following example shows how to declare regular expression on a screen section entry-field:


           03 e1 entry-field line 2 col 2 size 50 value var
              validation-regexp "^w+[w-.]*@w+((-w+)|(w*)).[a-z]{2,3}$"
              validation-errmsg "Invalid email address"
              validation-opts 7.
Due to the above code, if the entry-field content doesn't match with the regexp specified by validation-regexp, then the message specified by validation-errmsg is automatically shown by the runtime and the focus is kept on the field. validation-opts=1 means that the check is done case insensitive

Matches bob-smith@foo.com | bob.smith@foo.com | bob_smith@foo.com

Non-Matches -smith@foo.com | .smith@foo.com | smith@foo_com

The regexp syntax must respect Java specifications http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html.

Regular Expression are collected and discussed on the web. For example, on this web site http://regexlib.com/ you can find ready-to-use expression for common issues as well as an online regexp validator tool.

Authored by: Veryant Support This question has been viewed 5187 times so far.
Click Here to View all the questions in Deployment category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Did you know you can create temporary files in memory?
  2. What are the minimum files I need for a runtime-only installation? How do I create a launcher?
  3. How can I encode a URL String?
  4. Working with sequential files on Pipes
  5. Did you know isCOBOL IDE allows you to easily understand how to invoke a method in a Java Class?
  6. How do I generate an executable for deployment?
  7. How do I create an installation package for my COBOL application?
  8. Is there a way to to emulate the W$GETC routine?
  9. Did you know isCOBOL IDE allows you to easily understand how to invoke a method in a Java Class?
  10. Did you know you could choose from different languages for isCOBOL message?
  11. Did you know you could set a background image from isCOBOL IDE's painter?
  12. How can I read data correctly from a line-sequential file that has a different encoding from the one used by isCOBOL?
  13. Did you know these two ways of finding out the working directory in use?
  14. Can I mix versions of Java, isCOBOL compiler and isCOBOL runtime?
  15. How can I read a data written with a different encoding?
Article Information Additional Information
Article Number: 218
Created: 2013-11-20 5:34 AM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.