Skip to content

Commit

Permalink
feat(ui): Validates that description has 100 words
Browse files Browse the repository at this point in the history
+ Stops checking wordcount for qaqc method description.
  This was incorrect.

Closes #397
  • Loading branch information
vchendrix committed Oct 25, 2023
1 parent 15e48c4 commit 4b77f96
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
5 changes: 3 additions & 2 deletions archive_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ def validate(self, data):
'start_date'] > data['end_date']:
errors["end_date"]="Start date must come before end date"

if 'qaqc_method_description' in data.keys() and data['qaqc_method_description'] and len(data['qaqc_method_description'].split()) < 100:
errors["qaqc_method_description"] = "Methods Description must be at least 100 words."
# Make sure description has at least 100 words
if 'description' in data.keys() and data['description'] and len(data['description'].split()) < 100:
errors["description"] = "Description must be at least 100 words."

# Validate the selected plots
if 'plots' in data.keys():
Expand Down
Loading

0 comments on commit 4b77f96

Please sign in to comment.