ildar-shaymukhametov_grandnode-refactorings/Grand.Core/Extensions/FluentValidationUtilities.cs
using System.Linq;

namespace Grand.Core.Extensions
{
    public static class FluentValidationUtilities
    {
        public static bool PageSizeOptionsValidator(string value)
        {
            if (string.IsNullOrEmpty(value))
            {
                return true;
            }
            var notValid = value.Split(',').Select(p => p.Trim()).GroupBy(p => p).Any(p => p.Count() > 1);
            return !notValid;
        }
    }
}
