diff --git a/id.go b/id.go index 180070f..9f69714 100644 --- a/id.go +++ b/id.go @@ -19,6 +19,10 @@ func NewID() *ID { func (i *ID) Check() error { if i.URI == "" { return errors.New("uri element of id empty") + } else { + if !isValidURI(i.URI) { + return fmt.Errorf("uri element %v of id not correctly formatted", i.URI) + } } return nil