wagnerwagner / merx-starterkit

Complete demo shop. Ideal to explore many of Merx’s possibilities.
https://starterkit.merx.wagnerwagner.de
7 stars 0 forks source link

Missing "alpha" value in Personal Data Section Blueprint causes validation error in K4 #13

Closed lassereinboeng closed 9 months ago

lassereinboeng commented 9 months ago

Hi @tobiasfabian,

I just found something which caused a validation error in Kirby 4 (4.1.0-rc.1) and nearly drove me nuts 😅. The country field of the section blueprint personal-data.yml has an empty alpha value in the validate rules (line 75):

# Line 75
validate:
  alpha:
  minLength: 2
  maxLength: 2

This causes the Kirby alpha validator to throw an exception. I fixed it for my project by setting it to alpha: true. I don't know if this also happens in K3. But I thought I'd let you know about this, if you plan to upgrade the starter kit to K4 😊

Have a nice day! Lasse

tobiasfabian commented 9 months ago

Hi @lassereinboeng,

thanks for your issue. I couldn’t reproduce the issue with Kirby 4.1.0-rc.1 or other versions I quickly checked, but anyway, using alpha: true is the correct way to write this validator.