UNPKG
@findsoft/vue-fluctuation
Version:
latest (1.0.6)
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
a simple vue-component for the fluctuation of data
yanggoing.github.io
Yanggoing/vue-fluctuation
@findsoft/vue-fluctuation
/
src
/
components
/
validator.js
9 lines
(7 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
export
function
digitalValidator
(
value
) {
return
/^(\d|\.|,){1}$/
.
test
(value.
toString
()); }
export
function
looseDigitalValidator
(
value
) {
if
(value ===
undefined
|| value ===
null
|| value ===
''
)
return
true
;
return
/^(\d|\.|,)+$/
.
test
(value.
toString
()); }