Need the same level object value for its siblings #1006
Closed
abhishekmardiya
started this conversation in
General
Replies: 1 comment
-
|
If you need this value for validation, the only type safe solution is to put this validation in the pipeline of the outer object schema using const RegisterSchema = v.pipe(
v.object({
email: v.pipe(
v.string(),
v.nonEmpty('Please enter your email.'),
v.email('The email address is badly formatted.')
),
password1: v.pipe(
v.string(),
v.nonEmpty('Please enter your password.'),
v.minLength(8, 'Your password must have 8 characters or more.')
),
password2: v.string(),
}),
v.forward(
v.partialCheck(
[['password1'], ['password2']],
(input) => input.password1 === input.password2,
'The two passwords do not match.'
),
['password2']
)
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
can I get FLOOR_PLAN_PRICE_TYPE_RES value inside of FLOOR_PLAN_PRICE_VALUE_RES?
Beta Was this translation helpful? Give feedback.
All reactions