-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhtml.lisp
53 lines (34 loc) · 1.05 KB
/
html.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
(in-package #:org.tymoonnext.ratify.html)
(define-test checkbox (input start end)
(unless (or (not input) (stringp input))
(ratification-error input "Must be a string or NIL.")))
;; color
;; date
;; datetime
(define-test datetime-local (datetime start end)
(test-datetime datetime start end))
;; email
(define-test file (file start end)
(unless (pathnamep file)
(ratification-error file "Not a file.")))
;; month
;; number
(define-test password (pw start end)
(test-text pw start end))
(define-test radio (radio start end)
(test-checkbox radio start end))
(define-test range (range start end)
(test-float range start end))
(define-test search (search start end)
(test-text search start end))
(define-test tel (tel start end)
;; We can't do better than this. Curse internationality.
(test-text tel start end))
(define-test text (text start end)
(when (find #\Newline text :start start :end end)
(ratification-error text "Text must be a single line.")))
(define-test textarea (text start end)
text)
;; time
;; url
;; week