Extract common validation