Change URI to IRI after finding validation pattern
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
type Person struct {
|
||||
*CommonAttributes
|
||||
Name string `xml:"name"`
|
||||
URI URI `xml:"uri,omitempty"`
|
||||
URI IRI `xml:"uri,omitempty"`
|
||||
Email EmailAddress `xml:"email,omitempty"`
|
||||
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func (p *Person) Check() error {
|
||||
}
|
||||
|
||||
if p.URI != "" {
|
||||
if !isValidURI(p.URI) {
|
||||
if !isValidIRI(p.URI) {
|
||||
return fmt.Errorf("uri element of person %v not correctly formatted", p.Name)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user