In pico-1.51, the rule for "Form validated by HTML" has been changed radically.
read (1)~(3) again, please.
These are the new rule of the system for HTML designers.
Name of the field
It is "name" attribute.
You can also use linear array by just adding [] after the name.
eg) name="favorite_fruits[]"
Title of the field
The 1st option is <label> corresponding the <input>.
While the 1st option for "checkbox" or "radio" will be <legend> inside <fieldset></fieldset>
2nd option is "title" attribute in the tag.
Last option is "name" attribute in the tag. (same as Name)
essential
Specify it by class attribute.
eg1) <input ... class="required" />
eg2) <input ... class="required int" /> // "int" AND "required"
Type
Specify it by class attribute.
Only a type can be valid.
- int
-- filtered by intval()
- double
-- filtered by doubleval()
- singlebytes
-- filtered by mb_convert_kana( ... , 'as' )
- email
-- checked by RFC2822. an error will be raised if it is invalid.
- telephone
-- characters unused as telephone number will be removed.
フォームメールを使用するために色々テストをして気が付いたのですが、class="int required"の時に未入力だった場合テキストエリアに0が帰ってきます。