Open ronjunevaldoz opened 3 weeks ago
See #29
I didn't quite see if this shows the correct answer or is it a pending wip. This is not resolve on my end
With 0.7.0 and #86 the situation will improve a bit, but this could be better
Validation<CreateBasicAccountInput> {
validate("confirmPassword", { it.password to it.confirmPassword }) {
addConstraint("Passwords should match") {
it.password == it.confirmPassword
}
}
}
The above will have the correct path, but ideally addConstraint or similar should allow setting this directly
Please see related issue: https://github.com/konform-kt/konform/issues/35
Steps
Actual
error :dataPath: "", message: "Passwords should match"
Expectations
error: dataPath: "confirmPassword", message: "Passwords should match"