NAME

Strehler::FormFu::Validator::FilenameTooLong - FormFu Validator for File field in image form.

DESCRIPTION

A FormFu Validator to ensure that a user can't load an image with a name longer than 50 characters using the Image entity.

Images are not renamed when loaded in Strehler and their names are saved in the database. Database field for image name can't afford names longer than 50 characters.

This validator could be loaded using FormFu namespace, but for now I'll keep it in the Strehler distribution.

SYNOPSIS

In image form configuration:

elements:
    - type: File
      name: photo
      label: Image
      attributes: 
        class: span5
      validators:
        - type: '+Strehler::FormFu::Validator::FilenameTooLong'
          message: 'Filename is too long'