code: func isURI(fl FieldLevel) bool {
  
  	field := fl.Field()
  
  	switch field.Kind() {
  
  	case reflect.String:
  
  		s := field.String()
  
  		// checks needed as of Go 1.6 because of change https://github.com/golang/go/commit/617c93ce740c3c3cc28cdd1a0d712be183d0b328#diff-6c2d018290e298803c0c9419d8739885L195
  		// emulate browser and strip the '#' suffix prior to validation. see issue-#237
  		if i := strings.Index(s, "#"); i > -1 {
  			s = s[:i]
  		}
  
  		if len(s) == 0 {
  			return false
  		}
  
  		_, err := url.ParseRequestURI(s)
  
  		return err == nil
  	}
  
  	panic(fmt.Sprintf("Bad field type %T", field.Interface()))
  }
docs: // IsURI is the validation function for validating if the current field's value is a valid URI.