A valid ethereum address is "0x" + 40 hex characters.
What would be the Joi definition to validate that ?
A valid ethereum address is "0x" + 40 hex characters.
What would be the Joi definition to validate that ?
you have to use .extend
method of joi for creating custom validation. you can have regex based checking in .extend
method.
reference https://github.com/hapijs/joi/blob/v14.0.1/API.md#extendextension