1
This commit is contained in:
parent
84c3b3442a
commit
38890d3a5c
@ -26,9 +26,10 @@ def is_valid_int(v, **kwargs):
|
||||
|
||||
|
||||
def is_valid_srt(v, **kwargs):
|
||||
if isinstance(v, str):
|
||||
try:
|
||||
return str(v)
|
||||
return None
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def is_valid_float(v, **kwargs):
|
||||
@ -39,15 +40,17 @@ def is_valid_float(v, **kwargs):
|
||||
|
||||
|
||||
def is_valid_bool(v, **kwargs):
|
||||
if isinstance(v, bool):
|
||||
try:
|
||||
return bool(v)
|
||||
return None
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def is_valid_array(v, **kwargs):
|
||||
if isinstance(v, list):
|
||||
try:
|
||||
return [str(i) for i in v]
|
||||
return None
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def is_valid_ipv4(v, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user