Add common validation functionality