Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-33885 Blog: Added maxlength rule to subject field

  • Loading branch information...
commit 0408a480108468a33aa775f9511496ed3b3709e5 1 parent f2867a8
Frédéric Massart FMCorz authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  blog/edit_form.php
3  blog/edit_form.php
@@ -38,11 +38,12 @@ function definition() {
38 38
39 39 $mform->addElement('header', 'general', get_string('general', 'form'));
40 40
41   - $mform->addElement('text', 'subject', get_string('entrytitle', 'blog'), 'size="60"');
  41 + $mform->addElement('text', 'subject', get_string('entrytitle', 'blog'), array('size' => 60, 'maxlength' => 128));
42 42 $mform->addElement('editor', 'summary_editor', get_string('entrybody', 'blog'), null, $summaryoptions);
43 43
44 44 $mform->setType('subject', PARAM_TEXT);
45 45 $mform->addRule('subject', get_string('emptytitle', 'blog'), 'required', null, 'client');
  46 + $mform->addRule('subject', get_string('maximumchars', '', 128), 'maxlength', 128, 'client');
46 47
47 48 $mform->setType('summary_editor', PARAM_RAW);
48 49 $mform->addRule('summary_editor', get_string('emptybody', 'blog'), 'required', null, 'client');

0 comments on commit 0408a48

Please sign in to comment.
Something went wrong with that request. Please try again.