When your application creates a profile marker, the only information you are required to provide is a value to the key property. You may prefer that your profile markers conform to stricter standards, for example: all markers must have a key value that’s at least six characters. Or, your validation requirements may be based on application-specific business logic that is unrelated to marker properties. Create a validation class that enforces the validation standards appropriate for your profile markers.

The validation standards you define might vary based on the type of profile marker: profile markers with key X must have a value for key and value where as profile markers with key Y must have a Date value for expirationDate, which is a custom property you defined. You must match each validation component to a key; there is no way to create one validation component for all profile markers created by a given Profile Marker Manager.

Follow these steps to define new validation standards:

loading table of contents...