Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

If the form was sent without multipart-binary, there will be no :size key #114

Merged
merged 1 commit into from

2 participants

@kenrestivo

Handle this gracefully and invalidate the field without throwing an exception.

@kenrestivo kenrestivo If the form was sent without multipart-binary, there will be no :size…
… key. Handle this gracefully and invalidate the field without throwing an exception.
a21040c
@Raynes Raynes merged commit 3482117 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 4, 2012
  1. @kenrestivo

    If the form was sent without multipart-binary, there will be no :size…

    kenrestivo authored
    … key. Handle this gracefully and invalidate the field without throwing an exception.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/noir/validation.clj
View
3  src/noir/validation.clj
@@ -43,7 +43,8 @@
(defn valid-file?
"Returns true if a valid file was supplied"
[m]
- (and (> (:size m) 0)
+ (and (:size m)
+ (> (:size m) 0)
(:filename m)))
Something went wrong with that request. Please try again.