Here is part of my model
public class Sensor
{
public int Id { get; set; }
[Required]
[MaxLength(40)]
public string Name { get; set; }
}
Name is some text filed who is have maximum length of 40 symbols. And in this text field is possible to have few words.
My question is is it possible to set maximum length of word in Name property?
For Example is have: "Motion Detector". And I want the word to be maximum 8 symbols. This mean Motion and Detector is need to be less of 8 symbols length. The user can't write like "MotionDetector" whose length is 12 symbols.