Acme-Web20-Validator
view release on metacpan or search on metacpan
lib/Acme/Web20/Validator.pm view on Meta::CPAN
=head2 add_rule
$v->add_rule(
'Acme::Web20::Validator::Rule::HasAnyFees',
'Acme::Web20::Validator::Rule::UseCatalyst',
)
Adds validation rules to the validator.
=head2 set_all_rules
$v->set_all_rules;
Adds Acme::Web20::Validator::Rule::* to the validator.
=head2 validate
my @rules = $v->validate($url);
print $rules[0]->name;
print $rules[0]->is_ok ? 'Yes!' : 'No';
Validates the website and returns rules which know the result of each
validation and rule's description.
=head2 validation_report
print $v->validation_report($url)
## OR
$v->validate($url);
print $v->validation_report;
Returns a validation report formatted by Text::ASCIITable.
=head2 rules_size
Returns a number of rules validator has.
=head2 ok_count
Returns a number of OK after validation.
=head2 clear
$v->validation_report($url[0]);
$v->clear;
$v->validation_report($url[1]);
$v->clear;
...
Clears validation result in the instance for reusing. If you want to
validate for other rules, create a new instance instead of reusing
them.
=head1 SEE ALSO
L<Module::Pluggable>
=head1 TODO
Improve Catalyst, Rails checking logic.
Add more rules.
=head1 AUTHOR
Naoya Ito, E<lt>naoya@bloghackers.netE<gt>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
( run in 0.935 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )