mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
28 lines
988 B
Plaintext
28 lines
988 B
Plaintext
{
|
|
"name": "is_feature_valid",
|
|
"type": "function",
|
|
"groups": ["Record and Attributes"],
|
|
"description": "Returns TRUE if a feature meets all field constraints.",
|
|
"arguments": [{
|
|
"arg": "feature",
|
|
"description": "A feature. If not set, the feature attached to the expression context will be used.",
|
|
"optional": true
|
|
},{
|
|
"arg": "layer",
|
|
"description": "A vector layer. If not set, the layer attached to the expression context will be used.",
|
|
"optional": true
|
|
},{
|
|
"arg": "strength",
|
|
"description": "Set to 'hard' or 'soft' to narrow down to a specific constraint type. If not set, the function will return FALSE if either a hard or a soft constraint fails.",
|
|
"optional": true
|
|
}],
|
|
"examples": [{
|
|
"expression": "is_feature_valid(strength:='hard')",
|
|
"returns": "TRUE"
|
|
}, {
|
|
"expression": "is_feature_valid(get_feature('my_layer', 'FID', 10), 'my_layer')",
|
|
"returns": "FALSE"
|
|
}],
|
|
"tags": ["constraints", "hard", "soft"]
|
|
}
|