Use the validate function