Skip to content

Commit

Permalink
Add pattern checking for the handin filename field (from CodeRabbit)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhs-panda committed Nov 15, 2024
1 parent 377b22f commit e022e01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/assessments/_edit_handin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
value: f.object.handin_filename.presence || "handin.c",
help_text: "The suffix that is appended to student submission files. Autolab stores submission files in the handin directory as email/version_fname",
placeholder: "E.g. mm.c",
class: "handin-filename-field" %>
class: "handin-filename-field",
pattern: "^[a-zA-Z0-9._]+$",
title: "Only alphanumeric characters, dots, and underscores are allowed." %>
<%= f.text_field :max_size, help_text: "The maximum size that a handin file can have in megabytes (MB)." %>

<div class="action_buttons">
Expand Down

0 comments on commit e022e01

Please sign in to comment.