![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there a way to use a regular expression to validate a string in an object/soap message passed to a web service without performing a full schema validation? What I would like to do is something like: public class WebServiceRequest { private string _aString; [RegexValidation( Pattern="<Regular Expression goes here>")] public string AString { get{ return _aString; } set{ _aString = value; } } } Does such an attribute or other construct exist which causes the property to be validated against a regular expression by the web service infrastructure automatically when the soap request is deserialized? Steve |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
The [RegexValidation( Pattern="<Regular Expression goes here>")] attribute doesn't exist - I made it up. I probably didn't make it clear in my original post, but this is the type of construct I would like to use if there is one. Just as you can control Xml serialization and deserialization with attributes such as XmlIgnore and XmlElement I thought there may be something similar to match a property against a regular expression. Steve |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |