Skip to content

Commit

Permalink
validations to Article form
Browse files Browse the repository at this point in the history
  • Loading branch information
Matias000001 committed Dec 9, 2024
1 parent b353d8c commit 01ed176
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/story_tests/delete_reference.robot
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Set Article Information
Set Author Article_Kirjoittaja
Set Title Kirjoitus
Set Journal Sanomalehti
Set Year 1999
Set Year 1999
8 changes: 4 additions & 4 deletions src/templates/new_reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ <h3>Creating article type reference</h3>
<br>
<label for="author" class="col-sm-2 col-form-label col-form-label-sm">Author:</label>
<div class="col-sm-10">
<input type="text" name="author" minlength="2" maxlength="100" value="{{ request.form.get('author', '') }}" required>
<input type="text" name="author" pattern="[a-zA-ZäöåÄÖÅ,_\.\s]+" title="Author should contain only letters" minlength="2" maxlength="100" value="{{ request.form.get('author', '') }}" required>
</div>
<br>
<br>
<label for="title" class="col-sm-2 col-form-label col-form-label-sm">Title:</label>
<div class="col-sm-10">
<input type="text" name="title" minlength="2" maxlength="70" value="{{ request.form.get('title', '') }}" required>
<input type="text" name="title" pattern="[a-zA-ZäöåÄÖÅ,_\.\s]+" title="Title should contains only letters" minlength="2" maxlength="70" value="{{ request.form.get('title', '') }}" required>
</div>
<br>
<br>
Expand All @@ -73,7 +73,7 @@ <h3>Creating article type reference</h3>
<br>
<label for="year" class="col-sm-2 col-form-label col-form-label-sm">Year:</label>
<div class="col-sm-10">
<input type="number" name="year" max="9999" value="{{ request.form.get('year', '') }}" required>
<input type="number" name="year" pattern="/^\d+$/" title="Year contain only nubers" min="1000" max="2025" value="{{ request.form.get('year', '') }}" required>
</div>
<br>
<br>
Expand Down Expand Up @@ -339,4 +339,4 @@ <h3>Creating ACM type reference</h3>
}
</script>

{% endblock %}
{% endblock %}

0 comments on commit 01ed176

Please sign in to comment.