<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digital matter &#187; tips</title>
	<atom:link href="http://blog.loadlimits.info/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loadlimits.info</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 22 Jun 2010 10:46:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>複数の入力欄にまたがるValidationのエラーを特定の入力欄に表示させたい場合</title>
		<link>http://blog.loadlimits.info/2010/03/%e8%a4%87%e6%95%b0%e3%81%ae%e5%85%a5%e5%8a%9b%e6%ac%84%e3%81%ab%e3%81%be%e3%81%9f%e3%81%8c%e3%82%8bvalidation%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc%e3%82%92%e7%89%b9%e5%ae%9a%e3%81%ae%e5%85%a5%e5%8a%9b/</link>
		<comments>http://blog.loadlimits.info/2010/03/%e8%a4%87%e6%95%b0%e3%81%ae%e5%85%a5%e5%8a%9b%e6%ac%84%e3%81%ab%e3%81%be%e3%81%9f%e3%81%8c%e3%82%8bvalidation%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc%e3%82%92%e7%89%b9%e5%ae%9a%e3%81%ae%e5%85%a5%e5%8a%9b/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 17:10:02 +0000</pubDate>
		<dc:creator>hotpi</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[解決]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.loadlimits.info/2010/03/%e8%a4%87%e6%95%b0%e3%81%ae%e5%85%a5%e5%8a%9b%e6%ac%84%e3%81%ab%e3%81%be%e3%81%9f%e3%81%8c%e3%82%8bvalidation%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc%e3%82%92%e7%89%b9%e5%ae%9a%e3%81%ae%e5%85%a5%e5%8a%9b/</guid>
		<description><![CDATA[sfFormでSymfony 1.4のお話。
PostValidatorのエラーメッセージをどこに出せばいいんだ？という状況で使用できます。

class SomethingInputForm extends BaseForm
{
    public function configure()
    {
        // ...
        $this-&#62;validatorSchema-&#62;setPostValidator(
            new sfValidatorCallback(array('callback' =&#62; array($this, 'myCallbackFunc')))
        [...]]]></description>
			<content:encoded><![CDATA[<p>sfFormでSymfony 1.4のお話。</p>
<p>PostValidatorのエラーメッセージをどこに出せばいいんだ？という状況で使用できます。</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<pre>class SomethingInputForm extends BaseForm
{
    public function configure()
    {
        // ...
        $this-&gt;validatorSchema-&gt;setPostValidator(
            new sfValidatorCallback(array('callback' =&gt; array($this, 'myCallbackFunc')))
        );
    }

    public function myCallbackFunc($validator, $values) {
        // 何かバリデーション
        if (!($values['input1'] == $values['input2'] == $values['input3'])) {
            $error = new sfValidatorError($validator, 'error message ...');
            throw new sfValidatorErrorSchema($validator, array('input1' =&gt; $error));
        }

        return $values;
    }
}
</pre>
</div>
<p>こんな感じで、input1のエラーとして出力できるので、テンプレートのエラー表示が楽になります。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadlimits.info/2010/03/%e8%a4%87%e6%95%b0%e3%81%ae%e5%85%a5%e5%8a%9b%e6%ac%84%e3%81%ab%e3%81%be%e3%81%9f%e3%81%8c%e3%82%8bvalidation%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc%e3%82%92%e7%89%b9%e5%ae%9a%e3%81%ae%e5%85%a5%e5%8a%9b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhoneな人への地図URLの送り方</title>
		<link>http://blog.loadlimits.info/2010/02/iphone%e3%81%aa%e4%ba%ba%e3%81%b8%e3%81%ae%e5%9c%b0%e5%9b%b3url%e3%81%ae%e9%80%81%e3%82%8a%e6%96%b9/</link>
		<comments>http://blog.loadlimits.info/2010/02/iphone%e3%81%aa%e4%ba%ba%e3%81%b8%e3%81%ae%e5%9c%b0%e5%9b%b3url%e3%81%ae%e9%80%81%e3%82%8a%e6%96%b9/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 09:25:56 +0000</pubDate>
		<dc:creator>hotpi</dc:creator>
				<category><![CDATA[解決]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.loadlimits.info/2010/02/iphone%e3%81%aa%e4%ba%ba%e3%81%b8%e3%81%ae%e5%9c%b0%e5%9b%b3url%e3%81%ae%e9%80%81%e3%82%8a%e6%96%b9/</guid>
		<description><![CDATA[iPhone/iPod touchでもPCでも共通で見られるGoogleマップのURLを作りたくなったのでメモ。
というか、iPhone上のSafariから、Googleで場所を検索すると出てくるリンクですね。iPhoneの場合、このURLを開くと地図アプリが開きます。
http://maps.google.co.jp/?q=東京都新宿区西新宿２丁目８−１
http://maps.google.co.jp/?q=248-0006
PCのGoogleマップで地図のURL開くとめちゃくちゃ長くなってしまうので、こういう指定の仕方覚えておくと便利かも。
何がやりたかったかって言うと、twitterで○○の場所どこ？って聞かれて、とっさに住所だけ答えてしまったけど、iPhoneで使える地図のURLにしたほうが便利だったな、って思って。
]]></description>
			<content:encoded><![CDATA[<p>iPhone/iPod touchでもPCでも共通で見られるGoogleマップのURLを作りたくなったのでメモ。</p>
<p>というか、iPhone上のSafariから、Googleで場所を検索すると出てくるリンクですね。iPhoneの場合、このURLを開くと地図アプリが開きます。</p>
<p><a href="http://maps.google.co.jp/?q=%E6%9D%B1%E4%BA%AC%E9%83%BD%E6%96%B0%E5%AE%BF%E5%8C%BA%E8%A5%BF%E6%96%B0%E5%AE%BF%EF%BC%92%E4%B8%81%E7%9B%AE%EF%BC%98%E2%88%92%EF%BC%91">http://maps.google.co.jp/?q=東京都新宿区西新宿２丁目８−１</a></p>
<p><a href="http://maps.google.co.jp/?q=248-0006">http://maps.google.co.jp/?q=248-0006</a></p>
<p>PCのGoogleマップで地図のURL開くとめちゃくちゃ長くなってしまうので、こういう指定の仕方覚えておくと便利かも。</p>
<p>何がやりたかったかって言うと、twitterで○○の場所どこ？って聞かれて、とっさに住所だけ答えてしまったけど、iPhoneで使える地図のURLにしたほうが便利だったな、って思って。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadlimits.info/2010/02/iphone%e3%81%aa%e4%ba%ba%e3%81%b8%e3%81%ae%e5%9c%b0%e5%9b%b3url%e3%81%ae%e9%80%81%e3%82%8a%e6%96%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
