public bool Validate() { var result = PasswordText.Count(x => x.ToString() == UniqueChar); var data = MinLength <= result && MaxLength >= result; return(data); }