public void OnMetadataCreated(ModelMetadata metadata)
        {
            var additionalMetadataValue = new ValidationAttributeMetadata("required", ErrorMessageString);

            metadata.AdditionalValues.Add(Guid.NewGuid().ToString(), additionalMetadataValue);
        }
        public void OnMetadataCreated(ModelMetadata metadata)
        {
            var additionalMetadataValue = new ValidationAttributeMetadata("maxlen", ErrorMessageString, Length.ToString(CultureInfo.InvariantCulture));

            metadata.AdditionalValues.Add(Guid.NewGuid().ToString(), additionalMetadataValue);
        }