def validate_uri(value)
      URI.parse(value)
    rescue URI::InvalidURIError => e
      raise ValidationError, "invalid URI: #{e.message}"
    end
def validate_uri(value)
      URI.parse(value)
    rescue URI::InvalidURIError => e
      raise ValidationError, "invalid URI: 
    end
def validate_uri ( value ) URI . parse ( value ) rescue URI :: InvalidURIError => e raise ValidationError , "invalid URI: #{e.message}" end
Validate URI string format following RFC 2396
 (see http://tools.ietf.org/html/rfc2396)
Validate URI string format following RFC 2396 ( see http : // tools . ietf . org / html / rfc2396 )