Skip to content

API ReferenceValidationFunction

optionalNonZeroAddressRule()

function optionalNonZeroAddressRule<P, Field>(field): ValidationRule<P>;

Rule factory: allows an omitted address but rejects invalid or zero values.

Type Parameters

Type ParameterDefault typeDescription
P--
Field extends stringkeyof P & stringThe exact string key of P validated by this factory.

Parameters

ParameterType
fieldField

Returns

ValidationRule<P>