Provide a Validator Service

Bug #903264 reported by Thomas Berezansky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
Fix Released
Undecided
Dan Scott

Bug Description

From the commit:

OpenSRF Validator Service

Add a new Validator service, and EmailAddress validators.

The service runs a chain of one or more validators, each one being fed the normalized output of the previous one.

The return from each validator should be a hash of valid (0 or 1), the new normalized output (the untouched input if invalid or nothing needed to be changed), and if invalid an error string. Optionally, a validator can also include an "additionals" hash of extra information to be included in the final response.

The complete list of validators included is:

OpenSRF::Application::Validator::Base
    The base validator. Always returns valid.
OpenSRF::Application::Validator::Invalid
    Always returns invalid for testing purposes.
OpenSRF::Application::Validator::EmailAddress::Regex
    Does a very basic regular expression check on email addresses.
OpenSRF::Application::Validator::EmailAddress::DNS
    Uses Net::DNS to look up the domain on an email address

http://git.evergreen-ils.org/?p=working/OpenSRF.git;a=shortlog;h=refs/heads/user/tsbere/opensrf_validator

Tags: pullrequest
Dan Scott (denials)
Changed in opensrf:
assignee: nobody → Dan Scott (denials)
Revision history for this message
Dan Scott (denials) wrote :

Tested out nicely - I added one further commit to add basic tests, bring the MANIFEST up to date, and note the new dependency in Build.PL, but those were minor. Pushed to master.

Thanks very much Thomas!

Changed in opensrf:
milestone: none → 2.0.2
status: New → Fix Committed
milestone: 2.0.2 → none
milestone: none → 2.1.0-alpha
Dan Scott (denials)
Changed in opensrf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.