Skip to content

Instantly share code, notes, and snippets.

@cirpo
Created July 14, 2010 20:05
Show Gist options
  • Select an option

  • Save cirpo/475977 to your computer and use it in GitHub Desktop.

Select an option

Save cirpo/475977 to your computer and use it in GitHub Desktop.
if($this->getObject()->isNew() || $this->getValue('attachment_name') != $this->getObject()->getAttachmentName())
{
//check if attachment filename field or attachment file field are both filled, they both have to be filled if you want to upload an attachemnt file
$this->mergePostValidator(new AttachementNameAndAttachmentFileValidatorSchema());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment