Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update validation engine for email check

  • Loading branch information...
commit 25f44908206f0f2b33642bf79ec46e1ab82702ed 1 parent 4fef2e0
Vincent CHALAMON authored
6 data/generator/sfDoctrineModule/admin_template/parts/configuration.php
@@ -122,7 +122,11 @@ public function retrieveValue(<?php echo $this->getModelClass() ?> $object, $nam
122 122 {
123 123 $options = $object->getTable()->getColumnDefinition($name);
124 124 // Default value
125   - $value = $object->{"get".ucfirst(sfInflector::classify($name))}();
  125 + if (method_exists($object, "get".ucfirst(sfInflector::classify($name)))) {
  126 + $value = call_user_func(array($object, "get".ucfirst(sfInflector::classify($name))));
  127 + } else {
  128 + $value = $object[$name];
  129 + }
126 130 // Field is relation
127 131 /*if (preg_match('/_id$/i', $name) && $this->retrieveRelationName($object, $name))
128 132 {
2  web/js/validationEngine/jquery.validationEngine-fr.js
@@ -58,7 +58,7 @@
58 58 },
59 59 "email": {
60 60 // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
61   - "regex": /^((([A-z|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([A-z|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([A-z|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-z|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-z|\d|\-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([A-z|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([A-z|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-z|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-z|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([A-z|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
  61 + "regex": /^((([A-z|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([A-z|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([A-z|\d|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-z|\d|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-z|\d|\-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([A-z|\d|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([A-z|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-z|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-z|\d|\-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([A-z|\-|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
62 62 "alertText": "* Adresse email invalide"
63 63 },
64 64 "integer": {

0 comments on commit 25f4490

Please sign in to comment.
Something went wrong with that request. Please try again.