Sponsored Content
The Lounge What is on Your Mind? Please Welcome Nicki Paul to the Moderator Team! Post 303039599 by vbe on Thursday 10th of October 2019 04:03:44 AM
Old 10-10-2019
Smilie
 

2 More Discussions You Might Find Interesting

1. What is on Your Mind?

Please Welcome Dave Munro to the Moderator Team!

Dear All, I am very pleased to announce that Dave Munro (gull04) is joining the Moderation Team, after being a very valuable member of UNIX.com for 15+ years. Dave is an IT Consultant with 30 years of experience this year, has worked in many of the industry vertical market segments and has... (6 Replies)
Discussion started by: Neo
6 Replies

2. What is on Your Mind?

Please Welcome Simon Sweetman (Chubler_XL) to the Moderator Team

Happy Thanksgiving Holidays, Today, I am happy to welcome Simon Sweetman (Chubler_XL) to the Moderation Team to help provide us some important coverage from (Down Under) Australia. Simon is a Senior Analyst Programmer/Developer at Cedar Creek Company in Brisbane, Australia and his LinkedIn... (7 Replies)
Discussion started by: Neo
7 Replies
Validation::Class::Errors(3pm)				User Contributed Perl Documentation			    Validation::Class::Errors(3pm)

NAME
Validation::Class::Errors - Error Handling Object for Fields and Classes VERSION
version 7.70 SYNOPSIS
package SomeClass; use Validation::Class; package main; my $class = SomeClass->new; ... # errors at the class-level my $errors = $class->errors ; print $errors->to_string; # errors at the field-level my $field_errors = $user->fields->{name}->{errors} ; print $field_errors->to_string; 1; DESCRIPTION
Validation::Class::Errors is responsible for error handling in Validation::Class derived classes on both the class and field levels respectively. METHODS
new my $self = Validation::Class::Errors->new; add $self = $self->add("houston, we have a problem", "this isn't cool"); all my @list = $self->all; clear $self = $self->clear; count my $count = $self->count; each my $list = $self->each(sub{ ucfirst lc shift }); list my $list = $self->list; find my @matches = $self->find(qr/password/); first my $item = $self->first; my $item = $self->first(qr/password/); join my $string = $self->join; # returns "an error, another error" my $string = $self->join($delimiter); to_string The to_string method stringifies the errors using the specified delimiter or ", " (comma-space) by default. my $string = $self->to_string; # returns "an error, another error" my $string = $self->to_string($delimiter, sub { ucfirst lc shift }); AUTHOR
Al Newkirk <anewkirk@ana.io> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Al Newkirk. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-28 Validation::Class::Errors(3pm)
All times are GMT -4. The time now is 02:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy