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
4c928d8b
Commit
4c928d8b
authored
Feb 20, 2020
by
Christophe Benz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not validate empty values
parent
019680c5
Pipeline
#1765
failed with stage
in 3 minutes and 1 second
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 @
4c928d8b
...
...
@@ -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 @
4c928d8b
...
...
@@ -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 @
4c928d8b
...
...
@@ -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