Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8346db5

Browse files
Merge pull request#1890 from kamalqureshi/password_regex
Error message on password field
2 parents701d57c +ec18f90 commit8346db5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

‎client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.test.tsx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,16 @@ test("textInputValidate", () => {
7979
validateStatus:"error",
8080
help:trans("validationDesc.maxLength",{length:4,maxLength:2}),
8181
});
82+
83+
expect(
84+
textInputValidate({
85+
value:{value:""},
86+
required:false,
87+
minLength:0,
88+
maxLength:0,
89+
validationType:"Regex",
90+
regex:newRegExp("^.*$"),
91+
customRule:"",
92+
})
93+
).toMatchObject({validateStatus:""});
8294
});

‎client/packages/lowcoder/src/comps/controls/codeControl.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ function toRegExp(value: unknown): RegExp {
281281
returnvalueasRegExp;
282282
}elseif(valueType==="string"){
283283
constregexStr=trimStart(valueasstring,"^");
284-
returnnewRegExp("^"+(regexStr??".*")+"$");
284+
constfinalRegexStr=regexStr||".*";
285+
returnnewRegExp("^"+finalRegexStr+"$");
285286
}
286287
thrownewTypeError(
287288
`must be a valid JavaScript regular expression without forward slashes around the pattern`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp