]> git.evergreen-ils.org Git - OpenSRF.git/commit - src/extras/Makefile.install
OpenSRF Validator Service
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 9 Dec 2011 20:19:12 +0000 (15:19 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2011 17:51:48 +0000 (12:51 -0500)
commit5e1fbcc1c8ae2f969dbeac93fe1da80c008ca42b
tree79ea4e9448f22015cd4f530ff0ec0c9f47729d54
parentb6b64deb16ed3f005d64f99365b0220a82d72431
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

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
examples/opensrf.xml.example
src/extras/Makefile.install
src/perl/lib/OpenSRF/Application/Validator.pm [new file with mode: 0644]
src/perl/lib/OpenSRF/Application/Validator/Base.pm [new file with mode: 0644]
src/perl/lib/OpenSRF/Application/Validator/EmailAddress/DNS.pm [new file with mode: 0644]
src/perl/lib/OpenSRF/Application/Validator/EmailAddress/Regex.pm [new file with mode: 0644]
src/perl/lib/OpenSRF/Application/Validator/Invalid.pm [new file with mode: 0644]