Hi, I am using nopcommerce 4.40.4 and I created a customer attribute that is some kind of SSID in Brazil, it is called CPF and it is required to generate an invoice. It must be only numbers and have some number formation rules like digit verification.
I need to validate that field but nopcommerce only provides required field validation for customer attributes.
I created a new Validator based on RegisterModel, but for some reason it does not fill CustomerAttributes List, all other fields like Name are been populated, but CustomerAttributes list is not. Follow the code:

public partial class RegisterValidator : BaseNopValidator<RegisterModel>
{
  public RegisterValidator(ILocalizationService localizationService,
    IStateProvinceService stateProvinceService,
    CustomerSettings customerSettings)
  {
    Console.WriteLine("ViverOrg - RegisterValidator");


    RuleFor(x => x.FirstName).Must((x, context) =>
    {
      Console.WriteLine("x.FirstName:{0}", x.FirstName);
      return false;

    }).WithMessage("firstname {PropertyValue}");

    RuleFor(x => x.CustomerAttributes).Must((x, context) =>
    {
      Console.WriteLine("x.CustomerAttributes.Count():{0}", x.CustomerAttributes.Count());
      foreach (var attribute in x.CustomerAttributes)
      {
        Console.WriteLine("attribute.Name:{0}", attribute.Name);
        Console.WriteLine("attribute.DefaultValue:{0}", attribute.DefaultValue);
      }
      return false;

    }).WithMessage("validating customer attribute {PropertyValue}");
  }
}

I could figure out that nopcommerce validates customer attributes (isRequired flag) in a different way, its on (Nop.Web.Controllers.CustomerController.cs) in Register Method at line 788 (var customerAttributeWarnings = await _customerAttributeParser.GetAttributeWarningsAsync(customerAttributesXml);)
This method validates customer attributes (isRequired flag), so if I need to implement some custom validation, I will need to override (Nop.Services.Customers.CustomerAttributeParser) class, re implementing the (public virtual async Task<IList<string>> GetAttributeWarningsAsync(string attributesXml)) method?