Read our top 7 articles-
Regular expression in XPage - email validation :
You can use regular
expression in XPage using very simple steps.
Here we will use
simple validators to validate user email Id using regular expression.
Add few fields on XPage
including email Field/ or if you have already added in your XPage then apply
this email validation.
After adding email
field on XPage. Click on Email field - Refer below screen.
Check for Email Field
properties in property panel and then switch to the email field All
properties box.
Next –click on
Property ‘Validators’ and click on + sign button from values selector
& select xp:validateConstraint – Refer below screen.
Use below regular
expression code, this might have used before in your traditional lotus notes
web application for email validation email, here the same code we have to apply-
Add this regular expression
to regex property- refer below: ^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$;
Add your message
for email validation in message property.
For example – “Please enter
valid email Id”
Now, save your XPage
and check result in browser.
Here is the our
result-
Screen A: Enter value
and click on Save Button.
Screen B: Output.
Read our Best 5 articles-
- Learn XPage Repeat Control in Easy steps
- XPage Export To Excel using famous Client JavaScript in easy steps
- XPage Export To Excel using Server side JavaScript
- XPage Export To Excel using simple LotusScript
- XPage Mail Send Using very simple Lotus Script trick
- XPage Mail Send Using Server side JavaScript
Thanks for reading this article, hope you
like it, if you have any difficulty, please feel free to contact us on ‘admin@xpagedomino.com’ or click here to contact us.
’
Comments