adding new function - validateDeleteWithFunction