GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  INPUT::VALIDATOR::CONSTRAINT::CALLBACK (3)

.ds Aq ’

NAME

Input::Validator::Constraint::Callback - Callback constraint

CONTENTS

SYNOPSIS



    $validator->field(foo)->callback(sub {
        my $value = shift;

        return 1 if $value =~ m/^\d+$/;

        return (0, Value is not a number);
    });



DESCRIPTION

Run a callback to validate a field. Return a true value when validation succeded, and false value when failed.

In order to set your own error instead of a default one return an array where the error message is the second argument.

METHODS

CWis_valid

Validates the constraint.

SEE ALSO

Input::Validator, Input::Validator::Constraint
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 INPUT::VALIDATOR::CONSTRAINT::CALLBACK (3) 2011-08-09

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.