MishkaGervaz.Form.Verifiers.ValidateUploads (MishkaGervaz v0.0.1-alpha.3)

Copy Markdown View Source

Validates the uploads section of MishkaGervaz form DSL.

Four checks, in order:

  1. field reference (when set) names a field declared in the form.
  2. accept is a valid HTML accept string or list of MIME types / extensions (e.g. "image/*,.pdf" or [".pdf", "image/*"]).
  3. When external points to a module, that module is loadable. Anonymous-function externals are passed through.
  4. When writer is set, the writer module is loadable.

See MishkaGervaz.Form.Dsl.Uploads, MishkaGervaz.Form.Entities.Upload, MishkaGervaz.Form.Verifiers.Helpers, and sibling verifiers.