Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Validators
    • Labels:
      None
    • Environment:
      PostgreSQL 8.4, PHP 5.2.11, Apache2

      Description

      I'm generating my models from YAML. The email validator is correctly parsed into the model, but it doesn't work. If I try to insert 'a' or something that is not valid, I don't get any error at all and the row is inserted. See attachments for models.

      $user = new AppUser();
      $user->name = 'Testuser';
      $user->password = sha1('lala');
      $user->email = 'a';
      $user->role = 'ADMIN';
      $user->save();

      1. BaseAppUser.php
        2 kB
        Sander
      2. schema.yml
        0.6 kB
        Sander

        Activity

        Hide
        Benjamin Steininger added a comment -

        Is Validation activated for your Connection/Manager via the attributes ? It's off by default.

        From the manual:
        http://www.doctrine-project.org/documentation/manual/1_2/en/configuration#naming-convention-attributes:validation-mode-constants

        Validation by default is turned off so if you wish for your data to be validated you will need to enable it. Some examples of how to change this configuration are provided below.

        Show
        Benjamin Steininger added a comment - Is Validation activated for your Connection/Manager via the attributes ? It's off by default. From the manual: http://www.doctrine-project.org/documentation/manual/1_2/en/configuration#naming-convention-attributes:validation-mode-constants Validation by default is turned off so if you wish for your data to be validated you will need to enable it. Some examples of how to change this configuration are provided below.
        Hide
        Sander added a comment -

        Ah crap, I feel so stupid. My bad......

        Show
        Sander added a comment - Ah crap, I feel so stupid. My bad......

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Sander
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: