Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
extend("min", {
...min,
message: "Veuillez saisir au moins {length} caractères"
});
extend("max", {
...max,
message: "Veuillez ne pas dépasser {length} caractères"
});
extend("email", {
...email,
message: "Veuillez saisir une adresse email valide"
});
extend("min_value", {
...MinValue,
message: "Ce champs doit être supérieur à {min}"
});
extend("max_value", {
...MaxValue,
message: "Ce champs doit être inférieur à {max}"
});
extend("confirmedBy", {
params: ["target"],
// Target here is the value of the target field
validate(value, { target }: any) {
return value === target;
},
// here it is its name, because we are generating a message
},
// here it is its name, because we are generating a message
message: "Ce champs doit être identique au champs {target}"
});
extend("ext", {
...ext,
message: "Ce type de fichier n'est pas supporté"
});
extend("size", {
...size,
message: "Ce fichier dépasse la taille maximale autorisée : {size} kB"
});
extend("integer", {
...integer,
message: "Ce champs ne doit contenir qu'un nombre entier"
});
extend("regex", {
...regex,
message: "Le format de ce champs est incorrect"
});
import { extend } from 'vee-validate'
import { confirmed, email, max, min, numeric, required } from 'vee-validate/dist/rules'
extend('email', email)
extend('max', max)
extend('min', min)
extend('numeric', numeric)
extend('required', required)
extend('confirmed', confirmed)
extend('username', {
message: field => 'The ' + field + ' value is not valid.',
validate: value => /^[\w\d\-_']+$/g.test(value)
})
import Vue from 'vue'
import { ValidationProvider, extend, ValidationObserver } from 'vee-validate'
import { required, email, min, max, numeric, confirmed } from 'vee-validate/dist/rules'
import isDecimal from 'validator/lib/isDecimal'
Vue.component('ValidationProvider', ValidationProvider)
Vue.component('ValidationObserver', ValidationObserver)
extend('email', email)
extend('required', required)
extend('min', min)
extend('max', max)
extend('numeric', numeric)
extend('confirmed', confirmed)
extend('decimal', {
validate: val => isDecimal(val.toString()),
message: 'Please enter a valid number'
})
extend("required", {
...required,
message: "That field is required"
});
extend("min", {
...min,
message: "Veuillez saisir au moins {length} caractères"
});
extend("max", {
...max,
message: "Veuillez ne pas dépasser {length} caractères"
});
extend("email", {
...email,
message: "Veuillez saisir une adresse email valide"
});
extend("min_value", {
...MinValue,
message: "Ce champs doit être supérieur à {min}"
});
extend("max_value", {
...MaxValue,
message: "Ce champs doit être inférieur à {max}"
});
extend("confirmedBy", {
params: ["target"],
extend("ext", {
...ext,
message: "Ce type de fichier n'est pas supporté"
});
extend("size", {
...size,
message: "Ce fichier dépasse la taille maximale autorisée : {size} kB"
});
extend("integer", {
...integer,
message: "Ce champs ne doit contenir qu'un nombre entier"
});
extend("regex", {
...regex,
message: "Le format de ce champs est incorrect"
});
import Vue from 'vue'
import { ValidationProvider, extend, ValidationObserver } from 'vee-validate'
import { required, email, min, max, numeric, confirmed } from 'vee-validate/dist/rules'
import isDecimal from 'validator/lib/isDecimal'
Vue.component('ValidationProvider', ValidationProvider)
Vue.component('ValidationObserver', ValidationObserver)
extend('email', email)
extend('required', required)
extend('min', min)
extend('max', max)
extend('numeric', numeric)
extend('confirmed', confirmed)
extend('decimal', {
validate: val => isDecimal(val.toString()),
message: 'Please enter a valid number'
})
size,
integer,
regex
} from "vee-validate/dist/rules";
extend("required", {
...required,
message: "That field is required"
});
extend("min", {
...min,
message: "Veuillez saisir au moins {length} caractères"
});
extend("max", {
...max,
message: "Veuillez ne pas dépasser {length} caractères"
});
extend("email", {
...email,
message: "Veuillez saisir une adresse email valide"
});
extend("min_value", {
...MinValue,
message: "Ce champs doit être supérieur à {min}"
});
extend("max_value", {
...MaxValue,
import Vue from 'vue'
import { ValidationProvider, extend, ValidationObserver } from 'vee-validate'
import { required, email, min, max, numeric, confirmed } from 'vee-validate/dist/rules'
import isDecimal from 'validator/lib/isDecimal'
Vue.component('ValidationProvider', ValidationProvider)
Vue.component('ValidationObserver', ValidationObserver)
extend('email', email)
extend('required', required)
extend('min', min)
extend('max', max)
extend('numeric', numeric)
extend('confirmed', confirmed)
extend('decimal', {
validate: val => isDecimal(val.toString()),
message: 'Please enter a valid number'
})