typia.http.validateFormData() is a function decoding FormData instance,
with automatic type casting to the expected type. When roperty type be defined
as boolean or Blob type, typia.http.validateFormData() will cast the
value to the expected type when decoding.
Also, after decoding, typia.http.validateFormData() performs type validation
to the decoded value by combining with validate function. Therefore,
when the decoded value is not following the T type,
IValidation.IFailure would be returned. Otherwise,
x@xxxx IValidation.ISuccess} would be returned.
By the way, as FormData is not enough to express complex data structures,
typia.http.validateFormData() function has some limitations. If target type
T is not following those restrictions, compilation errors would be occured.
Type T must be an object type
Do not allow dynamic property
Only boolean, bigint, number, string, Blob, File or their array types are allowed
Form data decoder with type validation.
typia.http.validateFormData()
is a function decodingFormData
instance, with automatic type casting to the expected type. When roperty type be defined asboolean
orBlob
type,typia.http.validateFormData()
will cast the value to the expected type when decoding.Also, after decoding,
typia.http.validateFormData()
performs type validation to the decoded value by combining with validate function. Therefore, when the decoded value is not following theT
type, IValidation.IFailure would be returned. Otherwise, x@xxxx IValidation.ISuccess} would be returned.By the way, as
FormData
is not enough to express complex data structures,typia.http.validateFormData()
function has some limitations. If target typeT
is not following those restrictions, compilation errors would be occured.T
must be an object typeboolean
,bigint
,number
,string
,Blob
,File
or their array types are allowed