Help:Property constraints portal/None of

From Wikidata
Jump to navigation Jump to search

none-of constraint (Q52558054) specifies that certain values are not allowed for a property. It is the opposite of one-of constraint (Q21510859).

For example, an instance of (P31) statement should never use the values woman (Q467), female (Q6581072), man (Q8441), or male (Q6581097): all humans on Wikidata have the statement instance of (P31)human (Q5), and genders are differentiated via the separate property sex or gender (P21).

The constraint when used on main values is equivalent to a "conflicts-with constraint" with the same property.

If no constraint scope (P4680) is specified, this constraint is checked everywhere.

Possible actions

[edit]

There are several possible ways to address a violation of this constraint:

  • It is possible that the value is erroneous, and another value should be used instead, e. g. human (Q5) plus a separate sex or gender (P21)female (Q6581072) statement instead of woman (Q467).
  • It is possible that the statement is incorrect and should be removed.
  • It is possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Parameters

[edit]

This constraint has one mandatory parameter and three optional parameters:

item of property constraint (P2305)
Contains the disallowed values. no value Help and unknown value Help are interpreted literally, like any normal value (statements with no value Help or unknown value Help are not allowed if these special values are given in the disallowed values).
replacement property (P6824)
Optional; contains a single alternative property that should be used, or no value Help if no alternative property should exist.
If there are multiple values specified by item of property constraint (P2305) which should have different values for replacement property (P6824) then this constraint will need to be split into multiple statements.
replacement value (P9729)
Optional; specifies a single alternative value that should be used instead of all values listed by item of property constraint (P2305), or no value Help if no alternative value should exist.
If there are multiple values specified by item of property constraint (P2305) which should have different values for replacement value (P9729) then this constraint will need to be split into multiple statements.
constraint clarification (P6607)
Optional: explanatory text.

Phab:T277826 and phab:T219037 propose to include the optional parameters in the error message displayed by the constraint gadget.