Vee-validate: [Feature Request] decimal points for numeric

Created on 24 Aug 2016  路  4Comments  路  Source: logaretm/vee-validate

Hey! great plugin! congrats!
It would be great to have an option for validating the decimal points for numeric data
eg: numeric:{decimals}
<input type="text" data-rules="numeric"> // 123 valid, 12.34 invalid
<input type="text" data-rules="numeric:3"> // 123 valid, 12.34 valid, 147.527 valid, 13.2368 invalid

Most helpful comment

@RicardoEmpre added as decimal:{decimals}

https://logaretm.github.io/vee-validate/rules.html#rule-decimal

All 4 comments

@RicardoEmpre sounds good to me, I will probably add it later today.

@RicardoEmpre added as decimal:{decimals}

https://logaretm.github.io/vee-validate/rules.html#rule-decimal

@RicardoEmpre added as decimal:{decimals}

https://logaretm.github.io/vee-validate/rules.html#rule-decimal

is it available in vee-validate 3?

extend("decimal", {
...decimal,
message: "This field only contain decimal",
});
vee-validate.esm.js?7bb1:329 Uncaught Error: Extension Error: The validator 'decimal' must be a function or have a 'validate' method.
DOES NOT SEEM TO WORK
"vee-validate": "^3.3.0",
I don't see decimal in the list
export { alpha_dash, alpha_num, alpha_spaces, alpha, between, confirmed, digits, dimensions, email, ext, image, oneOf, integer, length, is_not, is, max, max_value, mimes, min, min_value, excluded, numeric, regex, required, required_if, size };

Was this page helpful?
0 / 5 - 0 ratings