Fix applyValidationRules function call