Sign in
apache
/
superset
/
fc02f0c7fc19dd176920fda82d794aebe33c5169
/
.
/
superset-frontend
/
packages
/
superset-ui-core
/
src
/
validator
/
validateNonEmpty.ts
blob: a3553fbd18c0fd19bd980b22c629acdad4ef8c8a [
file
] [
log
] [
blame
]
import
{
t
}
from
'../translation'
;
export
default
function
validateNonEmpty
(
v
:
unknown
)
{
if
(
v
===
null
||
typeof
v
===
'undefined'
||
v
===
''
||
(
Array
.
isArray
(
v
)
&&
v
.
length
===
0
))
{
return
t
(
'cannot be empty'
);
}
return
false
;
}