using System; using System.Collections.Generic; using Gestor.Model.Domain.Generic; using Gestor.Model.Helper; using Gestor.Model.Resources; using Newtonsoft.Json; namespace Gestor.Model.Domain.Seguros; public class Fabricante : IDomain { private string _descricao; public int Id { get; set; } public string Descricao { get { return _descricao?.ToUpper(); } set { _descricao = value; } } [JsonIgnore] public Func>> ValidationEvent => Validate; public List> Validate() { List> list = ValidationHelper.AddValue(); if (!string.IsNullOrWhiteSpace(Descricao) && Descricao.Length > 150) { list.AddValue("Descricao", string.Format(Messages.MaiorQueLimite, 150)); } return list; } }