private void ValidatePrivateUse() { if (_privateUse.Contains("x")) { throw new ValidationException("Private Use tag may not contain 'x'"); } _privateUse.ThrowIfSubtagContainsInvalidContent(); _privateUse.ThrowIfSubtagContainsDuplicates(); }
private void ValidateVariant() { var invalidPart = _variant.AllParts.FirstOrDefault(part => !StandardSubtags.IsValidRegisteredVariantCode(part)); if (!String.IsNullOrEmpty(invalidPart)) { throw new ValidationException( String.Format("'{0}' is not a valid registered variant code.", invalidPart) ); } _variant.ThrowIfSubtagContainsDuplicates(); }