From 65b1a62f6aa01b09c67af5362788b05aa84f98f0 Mon Sep 17 00:00:00 2001 From: James Cash Date: Tue, 13 Jan 2009 22:58:39 -0500 Subject: [PATCH] Fixes to v-checkbox --- basis/validators/validators-docs.factor | 2 +- basis/validators/validators.factor | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/validators/validators-docs.factor b/basis/validators/validators-docs.factor index 67c9f4fceb..8f5a587569 100644 --- a/basis/validators/validators-docs.factor +++ b/basis/validators/validators-docs.factor @@ -3,7 +3,7 @@ strings math regexp regexp.backend ; IN: validators HELP: v-checkbox -{ $values { "str" string } } +{ $values { "str" string } { "?" "a boolean" } } { $description "Converts the string value of a checkbox component (either \"on\" or \"off\") to a boolean value." } ; HELP: v-captcha diff --git a/basis/validators/validators.factor b/basis/validators/validators.factor index 04c85cd6db..e49f608e94 100644 --- a/basis/validators/validators.factor +++ b/basis/validators/validators.factor @@ -2,11 +2,11 @@ ! See http://factorcode.org/license.txt for BSD license. USING: kernel continuations sequences math namespaces make sets math.parser math.ranges assocs regexp unicode.categories arrays -hashtables words classes quotations xmode.catalog ; +hashtables words classes quotations xmode.catalog unicode.case ; IN: validators : v-checkbox ( str -- ? ) - "on" = ; + >lower "on" = ; : v-default ( str def -- str/def ) over empty? spin ? ;