How do I add verification when I update a field from postman?

SuiteCRM-7.11.23

I have this age field and I have given it some verification/condition that it will only save only if the inputted date has an age above a certain number. Made the validation attribute and inserted it in the custom vardefs. Works fine!.

However, when I want to update the birthdate field, what should I do to make the validation and where should I make it so that the calculated age would not be above a certain number? Also, as I said above, I have some verification on the birthdate field but whenever I create a new record from postman, I cant enter whatever date Instead of dates having an age above 18. How do I solve this?

Here is my date vardef



My before_save logic hook logic



I didn’t put the age field in the editview but only on the detailview




Also, whenever I save a date in mm-dd-yyyy format in Postman, it does not get reflected in the database as it saves it in yyyy-mm-dd format: