<commit_before><?php

/**
 * Entry Form
 *
 * @category    Postr
 * @package     Postr_Form
 */
class Postr_Form_Entry extends Zend_Form
{
    public function init()
    {
        $this->setAttrib('class', 'entry');
        $titleElement = new Zend_Form_Element_Text('title');
        $titleElement
            ->setLabel('Title')
        ;
        $this->addElement($titleElement);
        $contentElement = new Zend_Form_Element_Textarea('content');
        $contentElement
            ->setLabel('Content')
        ;
        $this->addElement($contentElement);
        $summaryElement = new Zend_Form_Element_Textarea('summary');
        $summaryElement
            ->setLabel('Summary')
        ;
        $this->addElement($summaryElement);
        $updatedElement = new Zend_Form_Element_Text('updated');
        $updatedElement
            ->setLabel('Updated')
        ;
        $this->addElement($updatedElement);
        $publishedElement = new Zend_Form_Element_Text('published');
        $publishedElement
            ->setLabel('Published')
        ;
        $this->addElement($publishedElement);
        $submitElement = new Zend_Form_Element_Submit('submit');
        $submitElement
            ->setLabel('Submit')
        ;
        $this->addElement($submitElement);
    }
}<commit_msg>Add validators to Entry Form.<commit_after><?php

/**
 * Entry Form
 *
 * @category    Postr
 * @package     Postr_Form
 */
class Postr_Form_Entry extends Zend_Form
{
    public function init()
    {
        $this->setAttrib('class', 'entry');
        $titleElement = new Zend_Form_Element_Text('title');
        $titleElement
            ->setLabel('Title')
            ->setRequired(true)
            ->addValidator('StringLength', false, array(0, 255))
        ;
        $this->addElement($titleElement);
        $contentElement = new Zend_Form_Element_Textarea('content');
        $contentElement
            ->setLabel('Content')
        ;
        $this->addElement($contentElement);
        $summaryElement = new Zend_Form_Element_Textarea('summary');
        $summaryElement
            ->setLabel('Summary')
        ;
        $this->addElement($summaryElement);
        $updatedElement = new Zend_Form_Element_Text('updated');
        $updatedElement
            ->setLabel('Updated')
            ->setRequired(true)
            ->addValidator('Date', false, array(Zend_Date::DATETIME_SHORT))
        ;
        $this->addElement($updatedElement);
        $publishedElement = new Zend_Form_Element_Text('published');
        $publishedElement
            ->setLabel('Published')
            ->addValidator('Date', false, array(Zend_Date::DATETIME_SHORT))
        ;
        $this->addElement($publishedElement);
        $submitElement = new Zend_Form_Element_Submit('submit');
        $submitElement
            ->setLabel('Submit')
        ;
        $this->addElement($submitElement);
    }
}
{'fraction_non_alphanumeric': 0.12892106170286108, 'fraction_numerical': 0.0013788348845225785, 'mean_word_length': 2.4021101992966, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3597392', 'n_tokens_mistral': 792, 'n_tokens_neox': 773, 'n_words': 120}