mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Added data annotation to have a proper validation on MenuText length based on its maximum length on database. (#8757)
This commit is contained in:
parent
d46f26d4c7
commit
eb09ab7f95
@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
|
||||
namespace Orchard.Core.Navigation.ViewModels {
|
||||
public class MenuPartViewModel {
|
||||
@ -7,7 +9,8 @@ namespace Orchard.Core.Navigation.ViewModels {
|
||||
public int CurrentMenuId { get; set; }
|
||||
public bool OnMenu { get; set; }
|
||||
|
||||
public ContentItem ContentItem { get; set; }
|
||||
public ContentItem ContentItem { get; set; }
|
||||
[StringLength(MenuPartRecord.DefaultMenuTextLength)]
|
||||
public string MenuText { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user