Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address: validate #86

Open
inghamn opened this issue Jun 24, 2019 · 3 comments
Open

Address: validate #86

inghamn opened this issue Jun 24, 2019 · 3 comments
Milestone

Comments

@inghamn
Copy link
Member

inghamn commented Jun 24, 2019

We need to implement a web service api for validating addresses. Clients should send a full address string, and we return a response with the valid address that matches the string they sent.

This was part of the old master address, and needs to be there for Rental and LegalTrack.

@inghamn inghamn added this to the 2.0 milestone Jun 24, 2019
@laurahaley
Copy link

laurahaley commented Jun 24, 2019 via email

@inghamn
Copy link
Member Author

inghamn commented Jun 24, 2019

We've never really come to a consensus on what consitutes a "valid" address. Each different application has intereted "valid" differently. (My Bloomington, Rental, LegalTrack, uReport, etc).

Master Address had a "verify" function, but it was only rudimentary. It considered an address valid if (and only if) you searched for the address string and got back one, and only one, result. Here's the code from the old Master Address:

<?php
if (count($search)) {
    $addresses = new AddressList();
    $addresses->find($search);

    // A valid address should return one and only one result
    if (count($addresses) == 1) {
        $address = $addresses[0];
    }
}

I do not believe this is really what anyone considers "valid", though.

@inghamn
Copy link
Member Author

inghamn commented Jun 24, 2019

MyBloomington considered an address valid only if it was both "current" and the active address for a location. I do not believe this check was ever done in any other application, though.

https://github.com/City-of-Bloomington/myCity/blob/master/src/Application/Controllers/IndexController.php

inghamn added a commit that referenced this issue Jun 25, 2019
This acts the same way validate worked in the old
master_address.  I don't think this is truly useful, yet;
but, it is needed to support existing applications, for now.

Updates #86
@inghamn inghamn modified the milestones: 2.0, 2.1 Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants