Fixing binding of validation function.