Tomas Jelinek has posted comments on this change. Change subject: UI: Cloud-Init gateway is not mandatory ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/25301/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/IpAddressValidation.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/IpAddressValidation.java: Line 5: public class IpAddressValidation extends RegexValidation Line 6: { Line 7: protected static final String IP_ADDRESS_REGEX = Line 8: "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"; //$NON-NLS-1$ Line 9: protected static final String EMPTY_REGEX = "|^$"; //$NON-NLS-1$ the name of constant is EMPTY_REGEX while it is somthine like OR_EMPTY_REGEX. But it is trivial enough to not have a constant I would say... Line 10: public IpAddressValidation() Line 11: { Line 12: this(false); Line 13: } Line 14: Line 15: public IpAddressValidation(boolean allowEmpty) { Line 16: String empty = (allowEmpty) ? EMPTY_REGEX : ""; //$NON-NLS-1$ Line 17: setExpression("^" + IP_ADDRESS_REGEX + empty + "$"); //$NON-NLS-1$ $NON-NLS-2$ Line 18: setMessage(ConstantsManager.getInstance().getConstants().thisFieldMustContainIPaddressInFormatMsg()); this message is not correct since it says: "This field must contain an IP address in format xxx.xxx.xxx.xxx" while it can also be empty (well, depending on the allowEmpty flag...). Line 19: } -- To view, visit http://gerrit.ovirt.org/25301 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b8fb3fd84158ee7c80662e85125b26d22148daa Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches