Options for transformedValue.
API
interface TransformedValueOptions<TValue, TRaw> {
parse: (rawValue: TRaw) => ParseResult<TValue>;
format: (value: TValue) => TRaw;
}
parse
(rawValue: TRaw) => ParseResult<TValue>Parse the raw value into the model value.
Should return an object containing the parsed result, which may contain:
-
value: The parsed model value. Ifundefined, the model will not be updated. -
error: Any parse errors encountered. Ifundefined, no errors are reported.
format
(value: TValue) => TRawFormat the model value into the raw value.