Powiadomienia
Wyczyść wszystko
BugOverflow
1
Wpisy
1
Użytkownicy
0
Reactions
899
Widoki
0
01/09/2022 12:32 pm
Rozpoczynający temat
example
1 odpowiedź
0
01/09/2022 12:48 pm
Rozpoczynający temat
example method
function action_add()
{
if ($this->request->post()) {
try {
$user = new Model_User();
$user->values($this->request->post());
$user->save();
} catch (ORM_Validation_Exception $exception) {
$this->setError($exception->errors( 'models'));
}
}
}
put this file inside application/messages/models/user.php
<?php defined('SYSPATH') OR die('No direct access allowed.');
return array(
'username' => array(
'not_empty' => 'musisz podać login',
),
'email' => array(
'not_empty' => 'e-mail nie może być pusty',
'email' => 'Podany adres e-mail nie jest poprawny. Sprawdź czy jest we własciwej formie.',
'max_length' => 'Hasło nie może być dłuższe niż :param2 znaków',
'not_like_login' => 'Hasło nie może być takie same jak login'
),
);
