Edit (Async)

Tag


Back to List

Tag Validation rules

The Tag data class, i.e. the one that is linked to the database, a number of validation rules, including one that is checked inside the EF SaveChanges.

Validation rules in Tag class, and inside EF SaveChanges
Property Validation rule Where shown? Where Checked*
Name Must not be empty By property Browser,MVC,EF
Name Must not be longer than 128 characters By property Browser,MVC,EF
Name Must not contain HTML symbols, e.g. <, > Exception MVC
Slug Must not be empty By property Browser,MVC,EF
Slug Must not be longer than 128 characters By property Browser,MVC,EF
Slug Must not be empty By property Browser,MVC,EF
Slug Must not contain spaces or non-alphanumeric characters By property MVC,EF
Slug Must be unique, i.e. must not exist in any other tag entry in the database By property SaveChanges

Note*: The 'Where Checked' terms are

The test for HTML symbols is done by MVC and throws an exception, which in the release version goes to the default error page.