Alpha Video Training
Results 1 to 12 of 12

Thread: Address Field Validation

  1. #1
    Member
    Real Name
    Matt Bodenheimer
    Join Date
    Jun 2007
    Posts
    82

    Default Address Field Validation

    I have a form where you enter street address into it. I am looking for a way where I can automatically validate the Address.

    For example
    instead of proper format
    1652 West 28th Street

    some people write it

    1652 w 28 st
    or
    1652 West 28 St
    or
    1652 W. 28 ST.
    or
    1652 w 28 street


    Is there anything I can do to prevent that, for example a user can write it however he wants but once he leaves that field it validates to the correct format?

    Matt

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Address Field Validation

    Hi Matt,

    Will the address always be just 4 elements?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    Member
    Real Name
    Matt Bodenheimer
    Join Date
    Jun 2007
    Posts
    82

    Default Re: Address Field Validation

    No I wish

    Our city is so crazy LOL

    We got 600 West Blue Heron Blvd

    we got 809 Old Dixie Highway

    we got 1620 Avenue H West (???)

    we got 1130 Avenue T and some people say 1130 T Avenue ???


    So I guess I need to look for validation of just

    BLVD
    ST
    AVE
    HWY
    WEST
    EAST
    CT

    instead of try to validate the entire field?

    Is this possible?

    MAtt

  4. #4
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Address Field Validation

    Matt,
    If I felt that this was something I needed to make sure of to reduce error then I would be looking for a directory of all the city's street names, place them into a table or text file, and either validate or build a progressive lookup against this table/file....or maybe have a browse of the table with a progressive lookup for the browse......And then make the user choose an entry only in this way.

    Just a thought or two.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Address Field Validation

    Matt, it might help if you collect the information one piece at a time:

    Street Number - 1120
    Street Type - Ave
    Street Name - George Washington
    Street Direction - West

    1120 George Washington Ave, West

    You could use dropdowns for the Street Type and Street Direction. You could punctuate and capitalize the Street Name.

    -- tom

  6. #6
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Address Field Validation

    What Tom mentions will for sure help, but as even your examples demonstrate, users will still be able to create many variations that would be hard to "trap". If total accuracy was needed (well, close to at least) then an actual list to choose from would be needed as I stated.....all a matter really of how far you need to carry the validation.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  7. #7
    Member
    Real Name
    Gary Schepp
    Join Date
    May 2006
    Posts
    196

    Default Re: Address Field Validation

    Quote Originally Posted by rbpd5015 View Post
    I have a form where you enter street address into it. I am looking for a way where I can automatically validate the Address.

    For example
    instead of proper format
    1652 West 28th Street

    some people write it

    1652 w 28 st
    or
    1652 West 28 St
    or
    1652 W. 28 ST.
    or
    1652 w 28 street


    Is there anything I can do to prevent that, for example a user can write it however he wants but once he leaves that field it validates to the correct format?

    Matt
    Just for the record.... proper formats for street direction are N, E, S, W, NE, NW, SE or SW. And use appropriate post office abbreviation for street type. IE Street should be St.

  8. #8
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,117

    Default Re: Address Field Validation

    I have a char field called "address" in that field you might enter "123 happy lane" but for some reason a user will hit num lock and NOT enter the number part and just the street. Some secretaries use the number pad to enter the street address but somehow click numlock and since they are such great typists they don't have to look at the screen they can just keep typing and save..... THEN complain to say the record didnt save right so what I want to do is have an alert that says "The address field does not appear to contain a number and or start with a number, are you sure the address is correct?"
    my question is thus, is there some sort of custom validation that can be done to determine if the field "contains" a number?

    I looked at some javascript code online elsewhere but not exactly sure how to implement it in AS I kinda want it to run in the validation rules. This is a grid but I would like to reuse this same code in a UX field as well
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  9. #9
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,022

    Default Re: Address Field Validation

    Charles, this is desktop version 8, What you want can be done though as far as determining if number exist in desktop field.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

  10. #10
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,117

    Default Re: Address Field Validation

    yes i asked the question in another thread after i realized my mistake. sorry for the confusion
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  11. #11
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,022

    Default Re: Address Field Validation

    Can you not turn off numlocks at some point?
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

  12. #12
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,682

    Default Re: Address Field Validation

    Ira Perlow created a function Keyboardstate() that can be used to check the on/off state of CAPSLOCK, NUMLOCK and a few other keys. I included it & my UDF Caps_Off() to test with just these two keys that can be put it in the OnInit event for a form. The file can be imported into the control panel code tab.
    Attached Files Attached Files
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

Similar Threads

  1. Field Validation validates an empty field???
    By mgbeecher in forum Alpha Five Version 7
    Replies: 2
    Last Post: 08-02-2006, 05:21 PM
  2. Grid component field validation (date field)?
    By Hansolo in forum Web Application Server v7
    Replies: 4
    Last Post: 01-26-2006, 11:21 AM
  3. Field Validation
    By richard dymond in forum Alpha Five Version 6
    Replies: 7
    Last Post: 09-21-2005, 05:14 AM
  4. Email Address Validation Rule
    By Chris Shinnick in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-07-2002, 10:52 AM
  5. Field Validation
    By bobsk in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-07-2002, 03:06 AM

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
  •