rename dv to dataValidation for readability
This commit is contained in:
parent
fb64b41043
commit
a5e7ceca1d
|
@ -1,23 +0,0 @@
|
||||||
import { DateTime } from "luxon"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
isNumber (n){
|
|
||||||
if(isNaN(n)){return false}
|
|
||||||
if (typeof n === "number") { return true }
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
isString (s){
|
|
||||||
if (typeof s === 'string') { return true }
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
dateStringIsValid(str){
|
|
||||||
if(str===null){return true}
|
|
||||||
if(DateTime.fromFormat(str,'yyyy-MM-dd').isValid){
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
isObject(objValue) {
|
|
||||||
return objValue && typeof objValue === 'object' && objValue.constructor === Object;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue