Skip to content

Commit

Permalink
fix(username_regex): cp consumer name regx different with dp (#2232)
Browse files Browse the repository at this point in the history
Co-authored-by: okaybase <[email protected]>
  • Loading branch information
zaunist and okaybase authored Dec 3, 2021
1 parent cbcac5f commit c613573
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/Consumer/components/Step1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Step1: React.FC<Props> = ({ form, disabled }) => {
rules={[
{ required: true },
{
pattern: new RegExp(/^[a-zA-Z][a-zA-Z0-9_]{0,100}$/, 'g'),
pattern: new RegExp(/^[a-zA-Z0-9_]+$/, 'g'),
message: formatMessage({ id: 'page.consumer.form.itemRuleMessage.username' }),
},
]}
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/Consumer/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
export default {
'page.consumer.form.itemRuleMessage.username':
'Maximum length is 100, only letters, numbers and _ are supported, and can only begin with letters',
'Maximum length is 100, only letters, numbers and _ are supported.',
'page.consumer.form.itemExtraMessage.username': 'Name should be unique',
'page.consumer.notification.warning.enableAuthenticationPlugin':
'Please enable at least one of the following authentication plugin:',
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/Consumer/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
export default {
'page.consumer.form.itemRuleMessage.username':
'最大长度100,仅支持字母、数字和 _ ,且只能以字母开头',
'最大长度100,仅支持字母、数字和 _ ',
'page.consumer.form.itemExtraMessage.username': '名称需唯一',
'page.consumer.notification.warning.enableAuthenticationPlugin': '请至少启用如下一种认证类插件:',
'page.consumer.username': '名称',
Expand Down

0 comments on commit c613573

Please sign in to comment.