Skip to content

Demo model not accessing config delimiter entries for validation #34

@sp00n

Description

@sp00n

In the /demo_files/application/models/demo_auth_model.php you're running the validation with fixed strings as their delimiters, like so:

// Set validation errors.
$this->data['message'] = validation_errors('<p class="error_msg">', '</p>');

instead of accessing the config file entries, which I assume (i.e. it works for me, but may not be the best way to access) would look like this:

// Set validation errors.
$this->data['message'] = validation_errors($this->auth->message_settings['delimiters']['error_prefix'], $this->auth->message_settings['delimiters']['error_suffix']);

As a demo this is probably fine, but if people (like me) just copy&paste your demo code and begin working on that as a basis, this might slip their mind and later on they might be wondering why the changes in the config file aren't represented in the actual output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions