Skip to content

Allow custom call back function with multi parameter #171

Open
@chaosthunder

Description

@chaosthunder

Hi Rick Harrison,

Thanks for your validate.js library. It helped us a lot.

And here is my issue: I need to check multi fields for each other:

Ex: min & max fields.
check_minmax(min, max) {
return (min < max);
}

But your callback register only allows 1 parameter.

I want to be able to call back like

validator.registerCallback('check_minmax', function(value1, value2) {
return (value1 < value2);
});

Can you extend the validate.js so that someone has a way to register multi fields check.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions