Sanitize user input: Difference between revisions
→{{header|Wren}}: Restricted name length to 20 characters and added another example.
(→{{header|Wren}}: Changed properties to fields.) |
(→{{header|Wren}}: Restricted name length to 20 characters and added another example.) |
||
Line 90:
var outer = false
for (se in Indexed.new(["first", "last "])) {
var name = Input.text("Enter your %(se.value) name : ", 1, 20)
var msg = sanitizeInput.call(name)
if (msg != "") {
Line 140:
Sorry, your name contains unacceptable characters.
Enter your first name : Blaine
... (plus another 11 acceptable people)▼
Enter your last name : Wolfeschlegelsteinhausenbergerdorff
Must have a length between 1 and 20 characters, try again.
Enter your last name : Wolfeschlegelstein'h
The following 15 person(s) have been added to the database:
Line 147 ⟶ 152:
Marilyn Monroe
Bridget O'Riley
Blaine Wolfeschlegelstein'h
... (
</pre>
|