koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
546 stars 155 forks source link

Password validation #335

Closed tonswart closed 2 years ago

tonswart commented 2 years ago

I would like to do a password validation for my registration page to see if password and repeatpassword do match. I tried to use the x-rules annotation with a function in the rules section. But the only value that is passed to the function is the value of the repeatpassword textfield. Is there a way to get both field values (or the data object) in this function?

albanm commented 2 years ago

The function only receives the value as a parameter, but can't you make it access the data object that you bind to vjsf by yourself ? I mean if it is passed as an option to vjsf, it should exist in the same component as the data object and be able to use it no ?