Schema: Don't accept omitted [] after all in [modify_ai] paths

This commit is contained in:
Celtic Minstrel 2018-03-31 11:30:35 -04:00
parent 36903bd245
commit 7bafab286b

View file

@ -266,33 +266,22 @@
[/type]
[type]
name="ai_modify_path"
# This only does some very basic validation and accepts quite a few invalid values.
# For example, only aspect[recruitment_instructions] can have a .recruit or .limit suffix.
[union]
# Toplevel components without index
# Aspect isn't really useful here but I guess is technically valid
[type]
value="aspect|goal|stage"
[/type]
# Toplevel components with index
# Toplevel components
[type]
value="(aspect|goal|stage)\[[^\]]*\]"
[/type]
# Facets without index
[type]
value="aspect\[[^\]]*\](\.facet\[[^\]]*\])*\.facet"
[/type]
# Facets with index
# Facets
[type]
value="aspect\[[^\]]*\](\.facet\[[^\]]*\])+"
[/type]
# Recruitment jobs with optional index
# Recruitment jobs
[type]
value="aspect\[[^\]]*\](\.facet\[[^\]]*\])+\.(recruit|limit)(\[[^\]]*\])?"
value="aspect\[\s*recruitment_instructions\s*]*\](\.facet\[[^\]]*\])+\.(recruit|limit)\[[^\]]*\]"
[/type]
# Candidate actions with optional index
# Candidate actions
[type]
value="stage\[[^\]]*\]\.candidate_action(\[[^\]]*\])?"
value="stage\[[^\]]*\]\.candidate_action\[[^\]]*\]"
[/type]
[/union]
[/type]