Remove all remaining validator_regexp

This commit is contained in:
nemunaire 2024-03-27 11:24:54 +01:00
commit ecb815666e
6 changed files with 9 additions and 9 deletions

View file

@ -797,7 +797,7 @@ type uploadedFlag struct {
IgnoreCase bool
Multiline bool
NoTrim bool
CaptureRe *string `json:"validator_regexp"`
CaptureRe *string `json:"capture_regexp"`
SortReGroups bool `json:"sort_re_grps"`
Flag string
Value []byte

View file

@ -32,8 +32,8 @@ function treatFlagKey(flag) {
if (flag.value && flag.soluce) {
if (flag.ignore_case)
flag.value = flag.value.toLowerCase();
if (flag.validator_regexp) {
var re = new RegExp(flag.validator_regexp, flag.ignore_case?'ui':'u');
if (flag.capture_regexp) {
var re = new RegExp(flag.capture_regexp, flag.ignore_case?'ui':'u');
var match = re.exec(flag.value);
match.shift();
flag.value = match.join("+");

View file

@ -47,8 +47,8 @@
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id || flag.show_raw" title="Chaîne brute à valider">
</div>
<div class="form-group">
<label for="kvre{{flag.id}}" class="col-form-label-sm">Validator regexp</label>
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
<label for="kvre{{flag.id}}" class="col-form-label-sm">Capture regexp</label>
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
</div>
<div class="form-group row">
<div class="col-auto custom-control custom-checkbox ml-1">

View file

@ -211,7 +211,7 @@
</div>
</div>
<div class="row">
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
</div>
</form>
<form ng-submit="testFlag(flag)">