Ryan Barry has posted comments on this change.

Change subject: Make FQDN validator abide by RFC1035
......................................................................


Patch Set 1:

Fixing the regular expression to check against RFC1035 is doable, and 
relatively easy, but I added a separate validator in order to give meaningful 
feedback to consumers of the validator.

Ultimately, it's fine to change the regex and just flag it as an invalid FQDN, 
but it gives no indication of why it's not a valid FQDN unless they're already 
familiar with RFC1035 (the low likeliness of someone having non-RFC1035 
compliant names aside). The FQDNLength validator provides an indicator of 
what's actually wrong with their input. I could add named capture groups and 
check for the presence/validity of those inside RegexValidator, but that's also 
somewhat kludgey.

I'm not tied to it, but I do like the resulting output somewhat better than 
fixing the regex and spitting back "The field must be a valid FQDN".

-- 
To view, visit http://gerrit.ovirt.org/15583
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I747a29c1a15b601bf1eea364b76e56818078e80b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Ryan Barry <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to