fuel/app/classes/validation/error.php
<?php
class Validation_Error extends Fuel\Core\Validation_Error
{
/**
* Override
*
* @param error message to parse
* @return string
*/
protected function _replace_tags($msg)
{
$msg = parent::_replace_tags($msg);
$find = __('validation.valid_string_params');
if( $find ){
foreach( $find as $param => $str ){
$msg = str_replace($param,$str,$msg);
}
}
return $msg;
}
}
fuel/app/lang/ja/validation.php
<?php
/**
* バリデーション時エラーメッセージ定義
*/
return array(
/**
* for Overridden Validation_Error
*/
'valid_string_params' => array(
'alpha' => 'アルファベット',
'utf8' => '全角文字',
'numeric' => '数値',
'spaces' => 'スペース',
'newlines' => '改行',
'tabs' => 'タブ',
'punctuation' => 'punctuation',
'singlequotes' => 'シングルクオート',
'doublequotes' => 'ダブルクオート',
'dashes' => 'ハイフン',
'brackets' => 'brackets',
'braces' => 'braces',
),