There are currently 5 different validator types, each with a unique role.
ValueValidators target all values of the specified type, regardless of where they are used. They are great if you want to validate non-unity objects, such as strings, structs, or classes. For example, they can be used to validate all strings in your project and make sure they don't contain forbidden words.
When should I consider using a ValueValidator?
If you wan't to learn how to create a custom ValueValidator, check out the following tutorial. Creating Custom ValueValidators
RootObjectValidators are great for validating Unity objects such as ScriptableObjects, Materials and Components, as you only get a warning / error message for the object itself which we call the root. Unlike the ValueValidator referencing a root object inside another object will not throw an additional warning / error.
When should I consider using a RootObjectValidator?
If you wan't to learn how to create a custom RootObjectValidator, check out the following tutorial. Creating Custom RootObjectValidators
AttributeValidators are great for validating objects based on if they have a specific attribute applied to them or not. This also allows you to take the arguments passed into the attribute into consideration when you validate your object. A good example for an attribute validator is the Range attribute, which takes min and max parameters that could be used inside the validator to check if the values are inside the range.
When should I consider using an AttributeValidator?
If you wan't to learn how to create a custom AttributeValidator, check out the following tutorial. Creating Custom AttributeValidators
SceneValidators can be used to validate scenes and scene objects. Let's assume you have a specific scene object that should only exist once, using a SceneValidator can ensure that you are notified if you accidentally add more than one of them to the hierarchy.
When should I consider using a SceneValidator?
If you wan't to learn how to create a custom SceneValidator, check out the following tutorial. Creating Custom SceneValidators
ISelfValidator can be implemented directly in the type you want to validate. This is the fastest and easiest way to validate all occurrences of an object and also gives you direct access to private members.
When should I consider using an ISelfValidator?
If you wan't to learn how to create a custom ISelfValidator, check out the following tutorial. Creating Custom ISelfValidators