Other than regular string, raw string, and open string, a string can be passed as an Internet email as it is predefined in the parser. The email format is derived from the HTML 5.1-Forms Email syntax recommended by W3C. Internet Object Email Format does not follow the RFC-5322 email representation as it is too strict to implement for the users.
Email format follows the syntax specified in the HTML 5.1 W3C recommendation under section 4.10.5.1.5.
The code snippet shows how to define an email-id
in the Internet Object Document.
MemberDef
The Email is derived from the String type, hence it shares the same MemberDef as the String. However, Email enforces additional constraints with the respective email format.
Choices
The choices
can be added to member variables in the email so that it is restricted to the fixed set of available choices. Choices must be an array of valid emails. Here, the snippet shows how to add choices for the string subtype email.
pattern
User may specify pattern
for the email by defining pattern
as shown in the snippet below.
Last updated