Forum OpenACS Q&A: Re: Example of a -validate block using template::element::create?

Hi Brian, following works for me with OpenACS 5.7:

template::element::create $form_id phone \
    -optional \
    -label $phone_label \
    -html {size 15} \
    -datatype text \
    -maxlength 50 \
    -validate { check_test {
        expr 1 > 2
    } {
        "Failure"
    }}