Answer the question
In order to leave comments, you need to log in
How to check the data from the client?
Hello!
I have users write posts to their blogs, write articles in an html editor, html text goes to the database, a post creation controller:
[HttpPost]
[ValidateAntiForgeryToken()]
public JsonResult CreateRecordBlog(BusinessLayer.Record.Record recordBL)
{
...
[Required]
[AllowHtml]
[StringLength(5000, ErrorMessage = "Размер записи должен быть минимум 200 знаков и максимум 5000.", MinimumLength = 200)]
public string Text { get; set; }
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question