Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

ValidationRuleSet init(rules: [Rule]) does not work with more than one Rule #136

Open
be-bert opened this issue Jan 29, 2020 · 1 comment

Comments

@be-bert
Copy link

be-bert commented Jan 29, 2020

I noticed when trying to use ValidationRuleSet's public init(rules: [Rule]) with more than one Rule with the same validate type I get an error.

For example using ValidationRuleLength and an email pattern with ValidationRulePattern,
provides the Xcode compile time error Cannot convert value of type 'ValidationRuleLength' to expected element type '_'

Any ideas how to solve this? Currently adding them individually works though.

Thanks!

@BrentMifsud
Copy link

I have the same issue when using a ValidationRuleCondition with a ValidationRulePattern

it works fine if you init a ruleset first and then add them afterwards.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants