Фикс регулярки
This commit is contained in:
parent
8ff10a0915
commit
970412b736
|
@ -27,7 +27,7 @@ export default {
|
||||||
if (this.price == ''){
|
if (this.price == ''){
|
||||||
this.price = null;
|
this.price = null;
|
||||||
}
|
}
|
||||||
if (typeof this.price == 'string' && /^\d+[\.,\,]?\d+$/.test(this.price)){
|
if (typeof this.price == 'string' && /^\d+[\.,\,]?\d*$/.test(this.price)){
|
||||||
this.price = parseFloat(this.price)
|
this.price = parseFloat(this.price)
|
||||||
}
|
}
|
||||||
let validateName = rules.notNull(this.name);
|
let validateName = rules.notNull(this.name);
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default {
|
||||||
if (this.price == ""){
|
if (this.price == ""){
|
||||||
this.price = null;
|
this.price = null;
|
||||||
}
|
}
|
||||||
if (typeof this.price == 'string' && /^\d+[\.,\,]?\d+$/.test(this.price)){
|
if (typeof this.price == 'string' && /^\d+[\.,\,]?\d*$/.test(this.price)){
|
||||||
this.price = parseFloat(this.price)
|
this.price = parseFloat(this.price)
|
||||||
}
|
}
|
||||||
let validateId = rules.id(this.wish_id);
|
let validateId = rules.id(this.wish_id);
|
||||||
|
|
Loading…
Reference in New Issue