[yast/yast-users] a24fb2: Move shared validation logic to a helper