Alpha Video Training
Results 1 to 3 of 3

Thread: Email Address Validation Rule

  1. #1
    Chris Shinnick
    Guest

    Default Email Address Validation Rule

    I am trying to create a field rule that will validate if an entry is a proper email address by looking for the @ symbol in the address. I have tried to do this by using a loop and the SUBSTR command to read the field entry and verify if that symbol exists. The problem is that I assign a variable to the length of the entry, but the SUBSTR command is unable to work with the variable. If I insert a number, everything is fine. This is the beginning of this code to do this below.

    tbl = table.current()
    address = tbl.email
    length = len(address)
    flag = 0

    for i = 1 to length
    A = substr(address,length,1)
    If A = "@" Then
    flag = flag + 1
    End If
    next

    if flag = 0 then
    msg = ui_msg_box("ERROR","This is not a valid email address.",UI_OK)
    end if

  2. #2
    Thomas Henkel
    Guest

    Default RE: Email Address Validation Rule

    Couldn't you just test for the existence of the "@" sign?? There is an operator that tests for a substring inclusion. the expression would be:

    "@" $ table.email

    What this does is to look for the occueance of a character,"@", ANYWHERE within the field table.email.
    The expression will return "true" if an "@" exists in the field.

    Tom

  3. #3
    Chris Shinnick
    Guest

    Default RE: Email Address Validation Rule

    This works much better. I am used to the javascript way of doing things.

Similar Threads

  1. Email & auto fill of To Email address
    By dchiass in forum Alpha Five Version 6
    Replies: 1
    Last Post: 10-29-2004, 06:37 AM
  2. Validation Rule
    By Ray in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-11-2003, 06:30 AM
  3. validation field rule
    By Becky McNichols in forum Alpha Five Version 4
    Replies: 5
    Last Post: 02-03-2002, 06:58 PM
  4. Custom Validation and/or Field Rule Event
    By Gary Roussie in forum Alpha Five Version 1
    Replies: 4
    Last Post: 03-07-2001, 04:26 AM
  5. Validation rule help
    By Chris Knapp in forum Alpha Five Version 4
    Replies: 13
    Last Post: 05-23-2000, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •