mirror of https://github.com/doccano/doccano.git
Hironsan
5 years ago
6 changed files with 59 additions and 30 deletions
Unified View
Diff Options
-
13frontend/components/organisms/LabelCreationForm.vue
-
8frontend/components/organisms/LabelList.vue
-
11frontend/components/organisms/MemberAdditionForm.vue
-
6frontend/components/organisms/MemberList.vue
-
18frontend/components/organisms/ProjectCreationForm.vue
-
33frontend/rules/index.js
@ -0,0 +1,33 @@ |
|||||
|
// Rules for project label.
|
||||
|
export const colorRules = [ |
||||
|
v => !!v || 'Color is required' |
||||
|
] |
||||
|
|
||||
|
export const labelNameRules = [ |
||||
|
v => !!v || 'Label name is required', |
||||
|
v => (v && v.length <= 30) || 'Label name must be less than 30 characters' |
||||
|
] |
||||
|
|
||||
|
// Rules for project member.
|
||||
|
export const userNameRules = [ |
||||
|
v => !!v || 'User is required' |
||||
|
] |
||||
|
|
||||
|
export const roleRules = [ |
||||
|
v => !!v || 'Role is required' |
||||
|
] |
||||
|
|
||||
|
// Rules for a project.
|
||||
|
export const projectNameRules = [ |
||||
|
v => !!v || 'Project name is required', |
||||
|
v => (v && v.length <= 30) || 'Project name must be less than 30 characters' |
||||
|
] |
||||
|
|
||||
|
export const descriptionRules = [ |
||||
|
v => !!v || 'Description is required', |
||||
|
v => (v && v.length <= 100) || 'Description must be less than 100 characters' |
||||
|
] |
||||
|
|
||||
|
export const projectTypeRules = [ |
||||
|
v => !!v || 'Project type is required' |
||||
|
] |
Write
Preview
Loading…
Cancel
Save