Hi,
The user of my .NET application must provide 20-digit account number in the application configuration file. I am derived class from ConfigurationSection to work with custom sections.
[ConfigurationProperty("RECEIVED_ACCOUNT", IsRequired = true)]
public string RECEIVED_ACCOUNT
{
get { return (string)this["RECEIVED_ACCOUNT"]; }
set { this["RECEIVED_ACCOUNT"] = value; }
}
I could use StringValidator
. It provides MaxLength, MinLength and InvalidCharacters.
But it does not allow to limit allowed characters to 0-9
w