File tree 2 files changed +10
-5
lines changed
app/src/interfaces/_system/system-filter
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @directus/app ' : patch
3
+ ---
4
+
5
+ Fixed the input pattern check in the filter component
Original file line number Diff line number Diff line change @@ -47,14 +47,14 @@ const inputPattern = computed(() => {
47
47
switch (props .type ) {
48
48
case ' integer' :
49
49
case ' bigInteger' :
50
- return ' [+\\ -]?[0-9]+' ;
50
+ return ' ^ [+\\ -]?[0-9]+$ ' ;
51
51
case ' decimal' :
52
52
case ' float' :
53
- return ' [+\\ -]?[0-9]+\\ .?[0-9]*' ;
53
+ return ' ^ [+\\ -]?[0-9]+\\ .?[0-9]*$ ' ;
54
54
case ' uuid' :
55
- return ' [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}' ;
55
+ return ' ^ [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$ ' ;
56
56
default :
57
- return ' ' ;
57
+ return undefined ;
58
58
}
59
59
});
60
60
77
77
);
78
78
79
79
function isValueValid(value : any ): boolean {
80
- if (value === ' ' || typeof value !== ' string' || new RegExp (inputPattern .value ).test (value )) {
80
+ if (value === ' ' || typeof value !== ' string' || ! inputPattern . value || new RegExp (inputPattern .value ).test (value )) {
81
81
return true ;
82
82
}
83
83
You can’t perform that action at this time.
0 commit comments