Passing the object to the validation function.