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

@ -296,7 +296,7 @@ func (e Exercice) CheckResponse(respflags map[string]string, respmcq map[int64]b
for _, flag := range flags {
if res, ok := respflags[flag.Label]; !ok {
valid = false
} else if !flag.Check(res) {
} else if !flag.Check([]byte(res)) {
if !PartialValidation || t.HasPartiallySolved(flag) == nil {
valid = false
}