Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Salamander - APP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Eirik Martin Danielsen
Salamander - APP
Merge requests
!71
Resolve "Fix location regex"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Fix location regex"
68-fix-location-regex
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Anders Langlie
requested to merge
68-fix-location-regex
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
Closes
#68 (closed)
Edited
3 years ago
by
Anders Langlie
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
f94badc0
1 commit,
3 years ago
2 files
+
6
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
constants/inputRequirements.js
+
5
−
3
Options
@@ -3,11 +3,13 @@ export const NUMBER_MAX_LENGTH = 15;
export
const
LOCATION_NUMBER_MAX_LENGTH
=
4
;
/******************************************* REGEXES ************************************************/
export
const
EMAIL_REGEX
=
"
^[ÆØÅæøåa-zA-Z0-9_.+-]+@[ÆØÅæøåa-zA-Z0-9-]+
\\
.[ÆØÅæøåa-zA-Z0-9-.]+$
"
;
// Valid email
export
const
PASSWORD_REGEX
=
"
^(?=.*[ÆØÅæøåA-Za-z])(?=.*
\\
d)[ÆØÅæøåA-Za-z
\\
d]{2,}$
"
;
// 9 characters, at least one letter and one number
export
const
EMAIL_REGEX
=
"
^[ÆØÅæøåa-zA-Z0-9_.+-]+@[ÆØÅæøåa-zA-Z0-9-]+
\\
.[ÆØÅæøåa-zA-Z0-9-.]+$
"
;
// Valid email
export
const
PASSWORD_REGEX
=
"
^(?=.*[ÆØÅæøåA-Za-z])(?=.*
\\
d)[ÆØÅæøåA-Za-z
\\
d]{2,}$
"
;
// 9 characters, at least one letter and one number
export
const
MEASUREMENT_REGEX
=
"
^(
\\
d+(?:[
\\
.
\\
,]
\\
d{1,2})?)$
"
;
// Accepts integers and decimal numbers with comma or period. 2 decimal precision!
export
const
INTEGER_REGEX
=
"
^[0-9]*[1-9][0-9]*$
"
;
//Accepts only integers
export
const
LEGAL_LOCATION_REGEX
=
"
^[ÆØÅæøå
\\
w
\\
-]+$
"
;
//Accepts trings containing legal file characters
export
const
LEGAL_LOCATION_REGEX
=
"
^[ÆØÅæøå
\\
w
\\
-]+$
"
;
//Accepts trings containing legal file characters
/**************************************** FEEDBACK MESSAGES *****************************************/
export
const
INVALID_EMAIL_MESSAGE
=
"
Invalid email!
"
;
Loading