mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
// 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'
|
|
]
|
|
|
|
// Rules for Document.
|
|
export const fileFormatRules = [
|
|
v => !!v || 'File format is required'
|
|
]
|
|
|
|
export const uploadFileRules = [
|
|
v => !!v || 'File is required',
|
|
v => !v || v.size < 1000000 || 'File size should be less than 1 MB!'
|
|
]
|