Email Pattern

Avatar

27-01-2009

Does anyone have a Email validation pattern?

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

28-01-2009

There is no pattern for a validating an email. You have to use script. There is a sample (Email Address) in the Custom Palette. The code is on the validate event.

Avatar

28-01-2009

Can someone post a script for email validate?



Does LiveCycle allow regular expressions?

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

28-01-2009

The code is in the sample.

Avatar

28-01-2009

I cant find the sample.. where would it be? Could you send it to me the_duxx@hotmail.com



Thanks

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

28-01-2009

In Designer on the Object Palette under the Custom section there is an email address object.

Avatar

Avatar
Level 1
graymak717
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
graymak717
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
graymak717
Level 1

03-03-2010

I found your post unhelpful because it implied that the sample validates all email addresses. In fact the sample script allows you validate email addresses for one specific domain -- "example.com". My users are spread across the country with access on various domains.

I was looking for a generic email validator.

I know this limits what I can validate but I would be happy it the script checked that the text box had no spaces, included an "@" sign and appeared to have at least two part domain name i.e. "somewhere.com", "somewhere.ca" or "somewhere.somewhere.com".

I basically want to check they haven't written their name in.

Avatar

03-03-2010

// Validate the email address.

var

r = new RegExp(); // Create a new Regular Expression Object.

r.compile("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{1,3}$"

,"i");// Set the regular expression to look for

                                                                                          // an email address in general form.

r.test(this.rawValue);

// Test the rawValue of the current object to see

                                   // if it fits the general form of an email address.

Just put this in the validate event of the email address field. Notice the "{1,3}" just before the dollar sign near the end. That means the last characters after the period (ie .com, .net, etc.) can be 1 to 3 in length. You can change them to any length you want.

Kyle