Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Merge requests
!93
validation of nd number added
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
validation of nd number added
148-validation-of-nd-number
into
master
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
Piotr Gawron
requested to merge
148-validation-of-nd-number
into
master
7 years ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
Closes
#148 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
15756ed9
1 commit,
7 years ago
3 files
+
10
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
smash/web/models/subject.py
+
4
−
1
Options
# coding=utf-8
from
django.core.validators
import
RegexValidator
from
django.db
import
models
from
constants
import
BOOL_CHOICES
,
SEX_CHOICES
,
SUBJECT_TYPE_CHOICES
,
COUNTRY_OTHER_ID
@@ -124,7 +125,9 @@ class Subject(models.Model):
)
nd_number
=
models
.
CharField
(
max_length
=
25
,
blank
=
True
,
verbose_name
=
'
ND number
'
verbose_name
=
'
ND number
'
,
validators
=
[
RegexValidator
(
'
^(ND[0-9]{4}|)$
'
,
message
=
"
ND number should look as follows: NDxxxx
"
)]
)
mpower_id
=
models
.
CharField
(
max_length
=
20
,
blank
=
True
,
Loading