Make the validate method standalone