Hi,
I'd like to create a litte Image Upload with just one Image. I have created a Form Class and in it this code to add a File Element:
public function initialize($entity = null, $options = null) {
    $profilePic = new File('profilePicture', $attributes);
    $profilePic->setLabel("Wähle ein Profilbild");           
}But how can i set $attributes to set a Validator to allow only .jpg or .png (by extension or by mimetype)?
Thanks for help.