fixes the custom validation, by using 'where' instead of find.