| 12345678910111213141516171819202122232425 |
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Controls;
- namespace TeamAAS_VP.Identity
- {
- public class PortValidationRule : ValidationRule
- {
- public override ValidationResult Validate(object value, CultureInfo cultureInfo)
- {
- if (value != null && Convert.ToInt32(value) > 0 && Convert.ToInt32(value) <= 65535)
- {
- return new ValidationResult(true, null);
- }
- else
- {
- return new ValidationResult(false, "Invalid_Port");
- }
- }
- }
- }
|