-
Hi i'm coming from laravel and learning both adonisjs and typescript at the moment i have a case where i need to validate old password if it's is the same as previously been set in user's data so i tried with example provided at Passing options to the rule so here's my custom rule setup: start/validator_rules.ts
contracts/validator.ts
app/Validators/ChangePasswordValidator.ts
app/Controllers/Http/PasswordController.ts
all other custom rules without any options works like charm but only with an option does not work i'm expecting to get the same value at another way to approach this is by getting user model in the custom rule file, start/validator_rules.ts in my case but guess i'm too dumb, can't figure that out by myself "@adonisjs/validator": "^12.4.1" node v16.19.1 npm 8.19.3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
never mind, found this feature is working as advertised this what makes it works, i can get the
compare that with my question above, it contains additional line in the third argument of rule definition
great to learn new thing today |
Beta Was this translation helpful? Give feedback.
never mind, found this feature is working as advertised
this what makes it works, i can get the
hashed
content is available in the rule definition nowcompare that with my question above, it contains …