Back to swiftlet.org | To report bugs, please use the issue tracker at GitHub.

error in documentation ?
  • svenn February 3
  • svenn February 3

    on this page : http://swiftlet.org/docs/?form
    if ( $model->form->errors )
    {
    if ( $model->form->errors['email'] )
    {
    $view->error = 'Please provide a valid e-mail address.';
    }
    }

    shouldn't this be :

    if ( $model->form->errors )
    {
    if ( isset($model->form->errors['email']) )
    {
    $view->error = 'Please provide a valid e-mail address.';
    }
    }

    As the key 'email' only exists if there is an error, however when something else is wrong (in that example, name) this would result in an error

  • ElbertF February 3

    The example will work (email is the only field that can have an error) but it's not a very good one. I'll change it, thanks. :)

  • svenn February 4

    a string to long would give an error aswell i think ?

  • ElbertF February 4

    True.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership