Implement validation logic for org.ovirt.engine.ui.uicompat.UriValidator
UriValidator IsValid() method currently always returns true.
UriValidator IsValid() method should return true only for valid URIs. The method should not throw any exceptions.
*** Bug 744568 has been marked as a duplicate of this bug. ***
This is a bit harder in client (GWT) code and cannot use the same approach used by backend in ValidationUtils class as URI is not a JRE enumated class,
Probably best approach is to implement by GWT RegExp.
I see two options here,
1) use JSNI - native JS regexp support, or
2) use GWT com.google.gwt.regexp.shared.RegExp
Take a look in the java URI code, and it seems to be native code (some string manipulation) that does the validation. maybe we can copy that code to a static util method and invoke it, to match the backend.
I think this is not relevant anymore.
uicompat's org.ovirt.engine.ui.uicompat.UriValidator is only used in uicommon's HostAddressValidation. Since UriValidator isn't implemented yet (always returns true), uicommon's HostAddressValidation doesn't really do any kind of validation.
On the other hand, in uicommonWEB, HostAddressValidation has been modified not to use UriValidator, and implements host address (IP or fully-qualified-domain-name) validation on its own.
Since both WebAdmin and new UserPortal use uicommonWEB, I guess we can close this ticket. [uicompat's UriValidator is only used by legacy UserPortal which isn't part of the build anymore]
Closing this ticket as uicompat's UriValidator class is not used in uicommonweb, and therefore not used in WebAdmin & new UserPortal.
(it's used only in old UserPortal through uicommon dependency)
In WebAdmin & new UserPortal, UriValidator functionality is implemented directly in uicommonweb's HostAddressValidation.