This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, Found a small problem (I think) with the ValidateUriAttribute. At the moment it assumes presence, however sometimes you may simply want an optional "website" field; and besides, ValidatePresence covers that domain.I would have thought it would skip validation if the field was empty, but it doesn't seem to do this. Have I missed something? Thanks for your help, Paul |
|
|
I think it already skips validation if the field is null, but not if the field is String.Empty (which is what you tend to get in e.g. data binding scenarios). I have added an optional IsRequired flag to the ValidateUriAttribute that you can set to false to permit empty URIs. IsRequired defaults to true. If you are using the designer then you will need to select the validation from the entity > property > validations folder in the LightSpeed Model explorer in order to get at the IsRequired field. This will be available in the 31 July nightly build. |
|