Data::Validate::Sanctions - Validate a name against sanctions lists
# as exported function use Data::Validate::Sanctions qw/is_sanctioned/; print 'BAD' if is_sanctioned($first_name, $last_name); # as OO use Data::Validate::Sanctions; my $validator = Data::Validate::Sanctions->new; print 'BAD' if $validator->is_sanctioned("$last_name $first_name"); Data::Validate::Sanctions is a simple validitor to validate a name against sanctions lists.
The list is from http://www.treasury.gov/ofac/downloads/sdn.csv, http://www.treasury.gov/resource-center/sanctions/Terrorism-Proliferation-Narcotics/Documents/plc_prim.csv, http://www.treasury.gov/ofac/downloads/fse/fse_prim.csv
run update_sanctions_csv to update the bundled csv.
is_sanctioned($last_name, $first_name); is_sanctioned($first_name, $last_name); is_sanctioned("$last_name $first_name"); when one string is passed, please be sure last_name is before first_name.
or you can pass first_name, last_name (last_name, first_name), we'll check both "$last_name $first_name" and "$first_name $last_name".
return 1 for yes, 0 for no.
it will remove all non-alpha chars and compare with the list we have.
Binary.com fayland@binary.com
Copyright 2014- Binary.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.