mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
661d72ef9b
(cherry picked from commit 035c474f10c257331a5f47e863d24af82537e335)
14 lines
407 B
C#
14 lines
407 B
C#
using FluentValidation;
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
namespace NzbDrone.Core.Validation
|
|
{
|
|
public static class IpValidation
|
|
{
|
|
public static IRuleBuilderOptions<T, string> ValidIpAddress<T>(this IRuleBuilder<T, string> ruleBuilder)
|
|
{
|
|
return ruleBuilder.Must(x => x.IsValidIpAddress()).WithMessage("Must contain wildcard (*) or a valid IP Address");
|
|
}
|
|
}
|
|
}
|