Suppress Invalid Attribute Error Attribute

SuppressInvalidAttributeError is used on members to suppress the inspector error message you get when applying an attribute to a value that it's not supposed to work on. This can be very useful for applying attributes to generic parameter values, when it only applies to some of the possible types that the value might become.

[Range(0, 10)]
public string InvalidAttributeError = "This field will have an error box for the Range attribute on a string field.";

[Range(0, 10), SuppressInvalidAttributeError]
public string SuppressedError = "The error has been suppressed on this field, and thus no error box will appear.";