Actions

QS

Em validation sq/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "例えば、回答を3の倍数に限定する場合、式は次のようになります。")
(Created page with "予約値''this''は、テキスト入力欄の入力値に自動的に置き換えられます。")
Line 18: Line 18:
<syntaxhighlight lang="php" enclose="div">(this / 3) == floor(this/3)</syntaxhighlight>
<syntaxhighlight lang="php" enclose="div">(this / 3) == floor(this/3)</syntaxhighlight>


The reserved variable ''this'' is automatically replaced by a reference to the active text entry cell.
予約値''this''は、テキスト入力欄の入力値に自動的に置き換えられます。


</onlyinclude>
</onlyinclude>


[[Category:Question Settings]][[Category:Question Logic Options]]
[[Category:Question Settings]][[Category:Question Logic Options]]

Revision as of 03:09, 19 May 2018


サブ質問の検証式 (em_validation_sq)

説明

各々のサブ質問(テキスト)を検証するための式です。検証条件に適合しないテキスト欄はエラーであることを示すため、背景色がピンク色になります(.em_sq_fn_validation CSSスタイルを使用)。正規表現ベースの検証も可能です。

有効な値

例えば、回答を3の倍数に限定する場合、式は次のようになります。

(this / 3) == floor(this/3)

予約値thisは、テキスト入力欄の入力値に自動的に置き換えられます。