Validation

105 views
Skip to first unread message

Mr. Mal

unread,
Oct 16, 2016, 3:43:18 AM10/16/16
to TiddlyWiki
Can we put validation at edittext form

PMario

unread,
Oct 16, 2016, 5:03:47 AM10/16/16
to TiddlyWiki
Hi Mr. Mal,


On Sunday, October 16, 2016 at 9:43:18 AM UTC+2, Mr. Mal wrote:
Can we put validation at edittext form

hmmmm, ... not with that much specification. ... IMO your request can mean everything, so I doubt someone will touch it. ...

...

hmmmm, ... maybe ... if we would know, what you have in mind?

--------

TiddlyWiki already has some sort of "input validation" if you look a the "tag", "field" or "tiddler-type" input editors. Those editors show a list of specific values, that are possible ... and ... you can enter a new value, which isn't part of the list.

  • Would this be an option for your use-case? 
    • If yes it should be straight forward and "relatively" simple to implement something.
    • If no ... more work and more info will be needed.

Just some thoughts:


It should be possible to add a new parameter to the <$edit-text> widget eg: "validate-format", which contains a regexp that describes the format, which is expected. .. The advantage of regexp'ses is, that they have "super powers" ... but ... the disadvantage is, that they get complicated very fast and are not suitable for every user.


A second possibility would be to create something like the "date-format" see: http://tiddlywiki.com/#DateFormat  to describe, what is expected. The advantage here is, it's simpler for users but exponentially more work to implement. .. Since we would need to create a "new validation language" first, that fits our needs.


---------


So how does your input look like and how can we describe it, so that a validation mechanism can check it?


have fun!

mario


Mr. Mal

unread,
Oct 20, 2016, 1:36:19 AM10/20/16
to TiddlyWiki
Hi PMario.

Thanks for fast reply. Sorry have other thing to do. So basicly I want to make a form for registration. It would be nice to have some validation to make the input accurate and reliable. See attachment for detail.

I just want to make the input for the name only accept character and few symbol just like database.

Thank you.
reg tw.png

PMario

unread,
Oct 20, 2016, 8:04:17 AM10/20/16
to TiddlyWiki
On Thursday, October 20, 2016 at 7:36:19 AM UTC+2, Mr. Mal wrote:
Thanks for fast reply. Sorry have other thing to do. So basicly I want to make a form for registration. It would be nice to have some validation to make the input accurate and reliable. See attachment for detail.

I just want to make the input for the name only accept character and few symbol just like database.

The tiddler title edit mode has a pattern detection. eg: Create a new tiddler and use "[] test" as a title. You'll see, what it does.
The problem is, that the implementation isn't user-friendly and there is no docs.
It defines "black-list" characters. IMO you need a "white-list". ... But I'm not sure, which chars you want to allow. ...

IMO forget the up and down arrows for the age. Users should enter a number. Otherwise you'd probably need a list from 0 up to 111+, which is inconvenient anyway.

see:
http://tiddlywiki.com/#%24%3A%2Flanguage%2FEditTemplate%2FTitle%2FBadCharacterWarning:%24%3A%2Flanguage%2FEditTemplate%2FTitle%2FBadCharacterWarning%20%24%3A%2Fcore%2Fui%2FEditTemplate%2Ftitle

-m

Tobias Beer

unread,
Oct 20, 2016, 11:51:05 AM10/20/16
to tiddl...@googlegroups.com
Hi Mario,

The problem is, that the implementation isn't user-friendly and there is no docs.
It defines "black-list" characters. IMO you need a "white-list". ... But I'm not sure, which chars you want to allow. ...

What do you need the white list for?

Generic means of form validation aren't quite the same thing
as checking tiddler titles for potential issues.

Preventing a user from even entering certain characters
may be a meaningful extension to the edittext widget.

Best wishes,

Tobias.
Reply all
Reply to author
Forward
0 new messages