libfic/flag: add validatorRegexp field

This commit is contained in:
nemunaire 2018-11-16 20:46:19 +01:00 committed by Pierre-Olivier Mercier
commit ff56ec9fe3
8 changed files with 111 additions and 35 deletions

View file

@ -27,11 +27,12 @@ type ExerciceUnlockFile struct {
// ExerciceFlag holds informations about a "classic" flag.
type ExerciceFlag struct {
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
Help string `toml:",omitempty"`
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
ValidatorRe string `toml:"validator_regexp,omitempty"`
Help string `toml:",omitempty"`
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
}
// ExerciceFlagMCQChoice holds a choice for an MCQ flag.
@ -57,6 +58,7 @@ type ExerciceFlagUCQ struct {
Label string `toml:",omitempty"`
Raw string
IgnoreCase bool `toml:",omitempty"`
ValidatorRe string `toml:"validator_regexp,omitempty"`
Help string `toml:",omitempty"`
DisplayAs string `toml:",omitempty"`
Choices_Cost int64 `toml:",omitempty"`