Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:25:45+00:00 2026-05-29T13:25:45+00:00

In Kohana documentation 3.2, there is an validation example under ORM directory. Let me

  • 0

In Kohana documentation 3.2, there is an validation example under ORM directory. Let me
reiterate some code related to my question here:

<form action="<?= URL::site(**'/members'**); ?>" method="post" accept-charset="utf-8">
<label for="username">Username:</label>
<input id="username" type="text" name="username" value="<?= Arr::get($values, 'username'); ?>" />
<label for="username" class="error"><?= Arr::get($errors, 'username'); ?>

<label for="password">Password:</label>
<input id="password" type="password" name="password" value="<?= Arr::get($values, 'password'); ?>" />
<label for="password" class="error"><?= Arr::get($errors, 'password'); ?>

<label for="password_confirm">Repeat Password:</label>
<input id="password_confirm" type="password" name="_external[password_confirm]" value="<?= Arr::path($values, '_external.password_confirm'); ?>" />
<label for="password_confirm" class="error"><?= Arr::path($errors, '_external.password_confirm'); ?>

<button type="submit">Create</button>
</form>

Then it defines a controller with:

public function action_create()
{
    $view = View::factory(**'members/create'**)
    ->set('values', $_POST)
    ->bind('errors', $errors);

    if ($_POST)
    {
        $member = ORM::factory('member')
        // The ORM::values() method is a shortcut to assign many values at once
        ->values($_POST, array('username', 'password'));

        $external_values = array(
            // The unhashed password is needed for comparing to the password_confirm field
            'password' => Arr::get($_POST, 'password'),
        // Add all external values
        ) + Arr::get($_POST, '_external', array());
        $extra = Validation::factory($external_values)
        ->rule('password_confirm', 'matches', array(':validation', ':field', 'password'));

        try
        {
            $member->save($extra);
            // Redirect the user to his page
            $this->request->redirect('members/'.$member->id);
        }
        catch (ORM_Validation_Exception $e)
        {
            $errors = $e->errors('models');
        }
    }

    $this->response->body($view);
}

My question is why it assigns ‘/members’ instead of ‘/members/create’ to the action
attribute of the form element ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:25:46+00:00Added an answer on May 29, 2026 at 1:25 pm

    It’s a typo. Starting from 3.1 form should always point to your route.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been reading through the documentation for Kohana ORM and in their example model
i am using kohana ORM in order to get some results from the database.
I'm using Kohana's ORM library, and I'm wondering if there is any way to
Reading Kohana's documentation, I found out that the main difference in 3.0 version is
I am using the Kohana framework (but I think it's irrelevant for this question)
How does Kohana determine if a request is an AJAX one? Is there anything
I am (newbie) using Kohana V 3.0.3 and my directory structure is: pojectsys (kohana's
I tried using Kohana/ORM on my localhost xampp and i get the following error
i can't find complete list of kohana validation rules list, can someone point me
In Kohana 3.2, passing external validation on Model_User upon save, why won't the correct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.