Last updated
Was this helpful?
Last updated
Was this helpful?
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 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
The code snippet shows how to define an email-id
in the Internet Object Document.
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.
User may specify pattern
for the email by defining pattern
as shown in the snippet below.
The Email is derived from the String type, hence it shares the same as the String. However, Email enforces additional constraints with the respective email format.