The way that components are validated isn't flexible enough to get custom validation ways.
Modifications
The FWValidador class now is a protocol that every validator should implement. Also FWRegexValidator is created to validate every regex, including the presetted regexes that is in the FWRegex enum.
Result
The code is more scalable now and every component that use a preset validation or need to use a custom regex do it passing a FWRegex enum to the FWRegexValidator.
Fix #76
Checklist
This PR is
[x] In accordance with our coding principles.
[x] Implementing tests wherever needed and possible.
Motivation
The way that components are validated isn't flexible enough to get custom validation ways.
Modifications
The
FWValidador
class now is a protocol that every validator should implement. AlsoFWRegexValidator
is created to validate every regex, including the presetted regexes that is in theFWRegex
enum.Result
The code is more scalable now and every component that use a preset validation or need to use a custom regex do it passing a
FWRegex
enum to theFWRegexValidator
.Fix #76
Checklist
This PR is