You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to insert every time value to field in Document Object i crated. To know if the value is valid i want to use Fields and their type with _deserialize method.
Example: validate Number with correct type without knowing Number is a Float type
I want to insert every time value to field in Document Object i crated. To know if the value is valid i want to use Fields and their type with _deserialize method.
Example: validate Number with correct type without knowing Number is a Float type
class EsDoc(Document):
----Number = Float()
doc = EsDoc
setattr(doc, 'Number', 't') # don't raise error
if i want to validate i must know that number is Float to use _deserialize method:
Float._deserialize(doc, doc.Number) # raise the error i want
mybe i miss something, there is a way to validate field type without knowing his type? or get his type in some way and then validate by this type?
Thanks
The text was updated successfully, but these errors were encountered: