March 23, 2010 at 11:21 am
Afternoon,
I'm having to store a title in an nvarchar column that may contain HTML.
Is it possible to write an expression for a column check constraint that will verify that this html is valid?
Thanks,
dnash
March 23, 2010 at 11:34 am
interesting David;so it would jsut be the html for <title></title>? and you want to make sure it doesn't have things like > instead of & g t ; in the text? stuff like that? or is it an entire html document,and you have to validate everything from missing </td> tags and all that?
Lowell
March 23, 2010 at 11:43 am
It's literally just simple html. Like if you had this as a survey title:
<b>Come and get it</b> - we <i>love</i> hamburger helper
I just need to confirm that tags match and all. I know how to do this in C# using a RegEx expression.
I'm migrating data from one schema to another and trying to replicate the validation rules in our new Business Layer with check constraints in order to avoid having to migrate all of the data in THROUGH that Business Object layer, which is written using a complicated .net/c# framework called CSLA.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply