Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
56dbb005
Unverified
Commit
56dbb005
authored
Mar 1, 2023
by
alihadi-mazeh
Committed by
GitHub
Mar 1, 2023
Browse files
Options
Downloads
Patches
Plain Diff
Added a type error validation for Roles Permission > Room limit (#4897)
* Added a type error validation * Localized latest change
parent
cf7d1e13
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/assets/locales/en.json
+3
-0
3 additions, 0 deletions
app/assets/locales/en.json
app/javascript/hooks/forms/admin/roles/useEditRoleLimitForm.js
+1
-0
1 addition, 0 deletions
...avascript/hooks/forms/admin/roles/useEditRoleLimitForm.js
with
4 additions
and
0 deletions
app/assets/locales/en.json
+
3
−
0
View file @
56dbb005
...
@@ -480,6 +480,9 @@
...
@@ -480,6 +480,9 @@
"required"
:
"Please enter the room count limit"
,
"required"
:
"Please enter the room count limit"
,
"min"
:
"Allowed minimum is 0"
,
"min"
:
"Allowed minimum is 0"
,
"max"
:
"Allowed maximum is 100"
"max"
:
"Allowed maximum is 100"
},
"type"
:
{
"error"
:
"You must specify a number"
}
}
},
},
"room"
:
{
"room"
:
{
...
...
This diff is collapsed.
Click to expand it.
app/javascript/hooks/forms/admin/roles/useEditRoleLimitForm.js
+
1
−
0
View file @
56dbb005
...
@@ -23,6 +23,7 @@ import { useCallback, useMemo } from 'react';
...
@@ -23,6 +23,7 @@ import { useCallback, useMemo } from 'react';
export
function
useEditRoleLimitFormValidation
()
{
export
function
useEditRoleLimitFormValidation
()
{
return
useMemo
(()
=>
(
yup
.
object
({
return
useMemo
(()
=>
(
yup
.
object
({
value
:
yup
.
number
().
required
(
'
forms.validations.role.limit.required
'
)
value
:
yup
.
number
().
required
(
'
forms.validations.role.limit.required
'
)
.
typeError
(
'
forms.validations.role.type.error
'
)
.
min
(
0
,
'
forms.validations.role.limit.min
'
)
.
min
(
0
,
'
forms.validations.role.limit.min
'
)
.
max
(
100
,
'
forms.validations.role.limit.max
'
),
.
max
(
100
,
'
forms.validations.role.limit.max
'
),
})),
[]);
})),
[]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment