Skip to content

Commit

Permalink
Merge pull request #85 from croservices/validate-file-fields
Browse files Browse the repository at this point in the history
Correct type
  • Loading branch information
Altai-man authored Oct 27, 2023
2 parents 99d6091 + 1bb5642 commit f274913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cro/WebApp/Form.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ role Cro::WebApp::Form {
ensure-acceptable-type($attr, $attr.type);
}
multi sub ensure-acceptable-type(Attribute $attr, Mu $type --> Nil) {
unless $type ~~ Str || $type ~~ Real || $type ~~ Date || $type ~~ DateTime || $type ~~ Cro::HTTP::Body::MultiPartFormData || Any ~~ $type {
unless $type ~~ Str || $type ~~ Real || $type ~~ Date || $type ~~ DateTime || $type ~~ Cro::HTTP::Body::MultiPartFormData::Part || Any ~~ $type {
die "Don't know how to handle type '$type.^name()' of '$attr.name()' in a form";
}
}
Expand Down

0 comments on commit f274913

Please sign in to comment.