Skip to content

Button action wont validate #17

@ambasador

Description

@ambasador

Hi all,

I've a problem with valid element age on click. I want to check first that element age is valid then load loadresults();, i've tried few option but they dont work, anyone knows how to fix it

$('button').click(function () {
loadresults();
});
var age = new LiveValidation('age', {
validMessage: "Message ",
wait: 1000
});
age.add(Validate.Numericality, {
minimum: 18,
maximum: 100,
onlyInteger: true,
notANumberMessage: "Only Numbers"
});
age.add(Validate.Presence, {
failureMessage: "Error"
});

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