func Example_replaceWorkAddress() {
	operation := `{
	"op": "replace",
	"path": "addresses[type eq \"work\"]",
	"value": {
		"type": "work",
		"streetAddress": "ExampleStreet 1",
		"locality": "ExampleCity",
		"postalCode": "0001",
		"country": "BE",
		"primary": true
	}
}`
	validator, _ := NewValidator(operation, schema.CoreUserSchema())
	fmt.Println(validator.Validate())
}
The following example shows how to change a User's entire "work" address, using a "valuePath" filter.
package patch
import (
	"fmt"
	"github.com/elimity-com/scim/schema"
)
func Example_replaceAnyAttribute() {
	operation := `{
	"op": "replace",
	"value": {
		"emails": [
			{
				"value": "quint",
				"type": "work",
				"primary": true
			},
			{
				"value": "me@di-wu.be",
				"type": "home"
			}
		],
		"nickname": "di-wu"
	}
}`
	validator, _ := NewValidator(operation, schema.CoreUserSchema())
	fmt.Println(validator.Validate())
}
func Example_replaceMembers() {
	operations := []string{`{
	"op": "replace",
	"path": "members",
	"value": [
		{
			"display": "di-wu",
			"$ref": "https://example.com/v2/Users/0001",
			"value": "0001"
		},
		{
			"display": "example",
			"$ref": "https://example.com/v2/Users/0002",
			"value": "0002"
		}
	]
}`,
	}
	for _, op := range operations {
		validator, _ := NewValidator(op, schema.CoreGroupSchema())
		fmt.Println(validator.Validate())
	}
}
func Example_replaceSpecificSubAttribute() {
	operation := `{
	"op": "replace",
	"path": "addresses[type eq \"work\"].streetAddress",
	"value": "ExampleStreet 100"
}`
	validator, _ := NewValidator(operation, schema.CoreUserSchema())
	fmt.Println(validator.Validate())
}