Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Validata
Validata Core
Commits
c1161609
Commit
c1161609
authored
Mar 04, 2020
by
Christophe Benz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cbenz-master-patch-18260' into 'master'
Do not validate empty values See merge request
!8
parents
019680c5
4c928d8b
Pipeline
#1793
failed with stage
in 3 minutes and 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
validata_core/custom_checks/french_siren_value.py
validata_core/custom_checks/french_siren_value.py
+4
-1
validata_core/custom_checks/french_siret_value.py
validata_core/custom_checks/french_siret_value.py
+3
-0
validata_core/custom_checks/year_interval_value.py
validata_core/custom_checks/year_interval_value.py
+1
-3
No files found.
validata_core/custom_checks/french_siren_value.py
View file @
c1161609
...
...
@@ -30,7 +30,10 @@ class FrenchSirenValue(object):
return
# Check value
value
=
cell
.
get
(
"value"
)
value
=
cell
.
get
(
'value'
)
if
not
value
:
return
if
not
stdnum
.
fr
.
siren
.
is_valid
(
value
):
message
=
'La valeur "{value}" n
\'
est pas un numéro SIREN français valide.'
message_substitutions
=
{
"value"
:
value
}
...
...
validata_core/custom_checks/french_siret_value.py
View file @
c1161609
...
...
@@ -37,6 +37,9 @@ class FrenchSiretValue(object):
# Check value
value
=
cell
.
get
(
'value'
)
if
not
value
:
return
if
not
stdnum
.
fr
.
siret
.
is_valid
(
value
):
message
=
"La valeur
\"
{value}
\"
n'est pas un numéro SIRET français valide."
message_substitutions
=
{
...
...
validata_core/custom_checks/year_interval_value.py
View file @
c1161609
...
...
@@ -56,9 +56,7 @@ class YearIntervalValue(object):
# Check value
value
=
cell
.
get
(
'value'
)
# Don't warn on empty values
if
value
==
''
:
if
not
value
:
return
# Checks for interval format
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment