Skip to main content
deleted 191 characters in body
Source Link
Oded
  • 500.7k
  • 102
  • 900
  • 1k

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don\'t match.'); } return $valid; } 

// mods remove this comment text: Edits must be at least 6 characters; is there something else to improve in this post? // All I wanted was to put a slash before one of the single quotes.

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don\'t match.'); } return $valid; } 

// mods remove this comment text: Edits must be at least 6 characters; is there something else to improve in this post? // All I wanted was to put a slash before one of the single quotes.

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don\'t match.'); } return $valid; } 
had to put a slash before the single quote because it breaked the php. Other than that it's great.
Source Link

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don'tdon\'t match.'); } return $valid; } 

// mods remove this comment text: Edits must be at least 6 characters; is there something else to improve in this post? // All I wanted was to put a slash before one of the single quotes.

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don't match.'); } return $valid; } 

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don\'t match.'); } return $valid; } 

// mods remove this comment text: Edits must be at least 6 characters; is there something else to improve in this post? // All I wanted was to put a slash before one of the single quotes.

Source Link
auto
  • 61
  • 1
  • 3

Override isValid in your form

/** * Validate the form, check passwords. * * @param array $data * @return boolean */ public function isValid($data) { $valid = parent::isValid($data); if ($this->getValue('password') !== $this->getValue('password2')) { $valid = false; $this->password2->addError('Passwords don't match.'); } return $valid; }