$text = array(
'foo' => '1234567',
);
var_dump(Valid::min_length($text['foo'], 5)); // Thats OK
$post = Validation::factory($text)
->rule('foo', 'min_length', array(NULL, 5));
if ($post->check())
{
var_dump('OK');
}
$errors = $post->errors('foo');
var_dump($errors);
var_dump($post);
->rule('foo', 'min_length', array(':value', 5));
I had a question - should 3.1 system/modules be able to transparently replace 3.0x of same?put it through the ringer!
I had a question - should 3.1 system/modules be able to transparently replace 3.0x of same?
<!DOCTYPE html>
<html lang="<?php echo Kohana::$charset; ?>">
...<!doctype html>
<html lang="<?php echo I18n::$lang; ?>">
<head>
<meta charset="<?php echo Kohana::$charset; ?>" />
Looks really good guys.
Changes to validation look really solid and will really help make it integrate better in complex libraries.
Good to see your response/request stuff finally getting out Sam!
Congrats! I've been waiting for 3.1 RC to start my next project. My first KO3 project as well.
kohana uses xhtml for all it's output
@zombor: I thought xhtml was a thing of the past ;)
Says who? It's the latest finished spec by W3C ;)
Debate that in a different thread though :)
@ neovive
If you're writing HTML5, code generated by Kohana is HTML not XHTML, because Kohana still sends "text/html; charset=utf-8"
xhtml has always used "text/html; charset=utf-8" because it's rendered as html not xml. xhtml 1.1 however is another story.
Let's not get into this here. I said debate that stupid discussion in a different thread please.
Sorry for the newbie question.
How do I download the RC1 and all the submodules?
When I go to https://github.com/kohana/kohana/tree/3.1/release/3.1.0 the git URL that shows is https://github.com/kohana/kohana.git which I think is not the git URL for RC1.
I tried
git clone git://github.com/kohana/kohana.git cd kohana git submodule update --init
but the downloaded submodules refere to 3.0.9
Thanks,
You can just jump into system and change the branch
git checkout --track -b mybranch-whatever origin/3.1/develop
thanks loonies,
This is what worked for me (for 3.1.0 branch)
$git clone git://github.com/kohana/kohana.git $cd kohana $git checkout --track origin/3.1/release/3.1.0 $git submodule update --init
It looks like you're new here. If you want to get involved, click one of these buttons!