A value to be validated
Validation result
Jeongho Nam - https://github.com/samchon
Validates a value type.
Validates a parametric value type and archives all the type errors into an
IValidation.errors array, if the parametric value is not following the
type T
. Of course, if the parametric value is following the type T
, the
IValidation.errors array would be empty and IValidation.success
would have the true
value.
If what you want is not finding all the error, but asserting the parametric value
type with exception throwing, you can choose assert function instead.
Otherwise, you just want to know whether the parametric value is matched with the
type T
, is function is the way to go.
On the other and, if you don't want to allow any superfluous property that is not
enrolled to the type T
, you can use validateEquals function instead.
A value to be validated
Validation result
Jeongho Nam - https://github.com/samchon
Validates a value type.
Validates a parametric value type and archives all the type errors into an IValidation.errors array, if the parametric value is not following the type
T
. Of course, if the parametric value is following the typeT
, the IValidation.errors array would be empty and IValidation.success would have thetrue
value.If what you want is not finding all the error, but asserting the parametric value type with exception throwing, you can choose assert function instead. Otherwise, you just want to know whether the parametric value is matched with the type
T
, is function is the way to go.On the other and, if you don't want to allow any superfluous property that is not enrolled to the type
T
, you can use validateEquals function instead.