validate errors callback