<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Комментарии на: Основы Zend_Form. Часть 1 &#8211; быстрый старт</title>
	<atom:link href="http://zend-framework.ru/osnovy-zend_form-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://zend-framework.ru/osnovy-zend_form-part-1/</link>
	<description>Статьи, руководства и заметки о фреймворке для PHP - Zend Framework</description>
	<lastBuildDate>Wed, 28 Jul 2010 19:14:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>От: woto</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-437</link>
		<dc:creator>woto</dc:creator>
		<pubDate>Sun, 07 Sep 2008 12:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-437</guid>
		<description>У блин, прям в мануале нашел то, чего не хватало :) ажно улыбнуло. Кул, ну значит буду уходить от своего класса в пользу стандартного.

class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract
{
    const NOT_MATCH = &#039;notMatch&#039;;

    protected $_messageTemplates = array(
        self::NOT_MATCH =&gt; &#039;Password confirmation does not match&#039;
    );

    public function isValid($value, $context = null)
    {
        $value = (string) $value;
        $this-&gt;_setValue($value);

        if (is_array($context)) {
            if (isset($context[&#039;password_confirm&#039;])
                &amp;&amp; ($value == $context[&#039;password_confirm&#039;]))
            {
                return true;
            }
        } elseif (is_string($context) &amp;&amp; ($value == $context)) {
            return true;
        }

        $this-&gt;_error(self::NOT_MATCH);
        return false;
    }
}</description>
		<content:encoded><![CDATA[<p>У блин, прям в мануале нашел то, чего не хватало <img src='http://zend-framework.ru/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ажно улыбнуло. Кул, ну значит буду уходить от своего класса в пользу стандартного.</p>
<p>class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract<br />
{<br />
    const NOT_MATCH = &#8216;notMatch&#8217;;</p>
<p>    protected $_messageTemplates = array(<br />
        self::NOT_MATCH =&gt; &#8216;Password confirmation does not match&#8217;<br />
    );</p>
<p>    public function isValid($value, $context = null)<br />
    {<br />
        $value = (string) $value;<br />
        $this-&gt;_setValue($value);</p>
<p>        if (is_array($context)) {<br />
            if (isset($context['password_confirm'])<br />
                &amp;&amp; ($value == $context['password_confirm']))<br />
            {<br />
                return true;<br />
            }<br />
        } elseif (is_string($context) &amp;&amp; ($value == $context)) {<br />
            return true;<br />
        }</p>
<p>        $this-&gt;_error(self::NOT_MATCH);<br />
        return false;<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: woto</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-436</link>
		<dc:creator>woto</dc:creator>
		<pubDate>Sun, 07 Sep 2008 12:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-436</guid>
		<description>Ага, так я и делал. А вот проверку совпадения полей можно? Я не допер как без изменения, если память не ошибает, то проблема была в том что какой-то интерфейс принимал только одно значение - проверяемое и способа передать второе без хирургического вмешательства не удалось.</description>
		<content:encoded><![CDATA[<p>Ага, так я и делал. А вот проверку совпадения полей можно? Я не допер как без изменения, если память не ошибает, то проблема была в том что какой-то интерфейс принимал только одно значение &#8211; проверяемое и способа передать второе без хирургического вмешательства не удалось.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Сергей Митрошин</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-435</link>
		<dc:creator>Сергей Митрошин</dc:creator>
		<pubDate>Sun, 07 Sep 2008 11:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-435</guid>
		<description>Менять Zend_Form в таких случаях не нужно, достаточно написать собственные валидаторы/элементы.</description>
		<content:encoded><![CDATA[<p>Менять Zend_Form в таких случаях не нужно, достаточно написать собственные валидаторы/элементы.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: woto</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-434</link>
		<dc:creator>woto</dc:creator>
		<pubDate>Sun, 07 Sep 2008 11:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-434</guid>
		<description>А методы есть? В прошлый раз мне приходилось менять zend_form под себя.</description>
		<content:encoded><![CDATA[<p>А методы есть? В прошлый раз мне приходилось менять zend_form под себя.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Сергей Митрошин</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-433</link>
		<dc:creator>Сергей Митрошин</dc:creator>
		<pubDate>Sat, 06 Sep 2008 05:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-433</guid>
		<description>Обязательно займусь :)</description>
		<content:encoded><![CDATA[<p>Обязательно займусь <img src='http://zend-framework.ru/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>От: woto</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-432</link>
		<dc:creator>woto</dc:creator>
		<pubDate>Fri, 05 Sep 2008 22:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-432</guid>
		<description>Было бы хорошо так же освятить вопросы связанные с нестандартной проверкой.
Например чтобы имя пользователя отсутствовало в бд. Или была проверка на совпадение двух полей для ввода пароля, а так же возможная связь с Zend_File_Transfer</description>
		<content:encoded><![CDATA[<p>Было бы хорошо так же освятить вопросы связанные с нестандартной проверкой.<br />
Например чтобы имя пользователя отсутствовало в бд. Или была проверка на совпадение двух полей для ввода пароля, а так же возможная связь с Zend_File_Transfer</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: Igor</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-66</link>
		<dc:creator>Igor</dc:creator>
		<pubDate>Wed, 11 Jun 2008 14:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-66</guid>
		<description>Ждем продолжения</description>
		<content:encoded><![CDATA[<p>Ждем продолжения</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: hudson</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-19</link>
		<dc:creator>hudson</dc:creator>
		<pubDate>Thu, 27 Mar 2008 07:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-19</guid>
		<description>Заранее спасибо :)</description>
		<content:encoded><![CDATA[<p>Заранее спасибо <img src='http://zend-framework.ru/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>От: admin</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-18</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 27 Mar 2008 06:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-18</guid>
		<description>Чуть позже займусь, оформлю в виде отдельной записи.</description>
		<content:encoded><![CDATA[<p>Чуть позже займусь, оформлю в виде отдельной записи.</p>
]]></content:encoded>
	</item>
	<item>
		<title>От: hudson</title>
		<link>http://zend-framework.ru/osnovy-zend_form-part-1/comment-page-1/#comment-17</link>
		<dc:creator>hudson</dc:creator>
		<pubDate>Thu, 27 Mar 2008 05:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://zend-framework.ru/2008/03/osnovy-zend_form-part-1/#comment-17</guid>
		<description>Если можно - на примере плз :) Например из вышеприведенного кода это не следует. А как правильно &quot;приготовить&quot; форму, пока увы не додумался.</description>
		<content:encoded><![CDATA[<p>Если можно &#8211; на примере плз <img src='http://zend-framework.ru/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Например из вышеприведенного кода это не следует. А как правильно &#8220;приготовить&#8221; форму, пока увы не додумался.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
