Hi Vladimir,

Thanks - responses below.

On Wed, Dec 7, 2011 at 11:02 AM, Vladimir Kostyukov <vladimir.kostukov@gmail.com> wrote:
Hi Yaron,

Regarding yours questions.

- Yes, I've added this feature only for "text with autocomplete" and for "combobox". The reason of it very simple: I didn't need this functionality for "textarea". Actually, It seems to me, that we can very easily add this feature to "textarea" input.

Okay. Yes - it does, indeed, seem like that would be easy to do.

- You are right. It works only for single-value inputs now.

Okay. This is potentially a big problem, because it means that any input that held multiple values would automatically get rejected - if the allowed values were, say, "A", "B" and "C", and the user entered "A, B", the code would compare that to the three allowed values, see that it wasn't equal to any of them, and reject the value. Is there any way this can be fixed? It would require some more Javascript hacking, but I think it would definitely be worth it.

- Yes. Field should be declared as "mandatory". I've decided to implement following case:

{{{field|FieldName|input type=text with autocomplete|values from category=Category|existing values only|mandatory}}}

Will be validated for "one-to-many".

{{{field|FieldName|input type=text with autocomplete|values from category=Category|mandatory}}}

Will be validated for "non-blank".

{{{field|FieldName|input type=text with autocomplete|values from category=Category}}}

Won't be validated.

Well, that seems strange - "mandatory" and "existing values only" are two different restrictions, and either one could theoretically be used without the other. Is there any way these could be separated?


Thanks for feedback. If its needed I can make some changes in my patch. Please, keep me update.

On Wed, Dec 7, 2011 at 10:47 PM, Yaron Koren <yaron@wikiworks.com> wrote:
Hi Vladimir,

Sorry again about the delay, and thanks for the reminder. I just looked through your patch, and it looks like quite a useful feature. I have a few questions:

- You added this capability in for the "text with autocomplete" input type, but not for "textarea with autocomplete". Is there a reason for that, or you just didn't need it for textareas?

- Will this work for inputs that allow multiple values? It seems like it won't.

- It appears that this validation will only kick in if the field is declared as "mandatory". Is that true, and if so, is it on purpose?


On Wed, Dec 7, 2011 at 1:16 AM, Vladimir Kostyukov <vladimir.kostukov@gmail.com> wrote:
Hi Yaron,

Have you looked into my patch about validation. Could you please update status?

On Wed, Nov 30, 2011 at 12:35 AM, Yaron Koren <yaron@wikiworks.com> wrote:
Hi Vladimir,

Sorry about the delay - we've had the Thanksgiving break here, which has restricted my internet time significantly. This patch sounds very interesting, and I plan to look at it at some point soon, unless someone else does first.


On Tue, Nov 29, 2011 at 12:26 PM, Vladimir Kostyukov <vladimir.kostukov@gmail.com> wrote:
Hi All! I'veresent my mail about validation patch, because I haven't
got any feedback.

I've justsuccessfully implemented correct validation feature in
Semantic Forms (see attached).

Actually, when I've started use SMW I was surprised that it is not
support any validation mechanism (I mean one-to-many case).

Now, we can use "existing values only" property for "text with
autocompleteinput" and with "combobox" elements. But I've changed
behaviorof validation mechanism. Now incorrect fields are not
clearing when user input incorrect data. It is checking onsubmitting

Also my patch fixed bug with fields which edited last. For instance:
we can enable "existing values only" for combobox in current
implementation and it will not work for fields, in which we enter
incorrect data and than click submit (without changing focus) (see
"change" event of jQuery).

In current patch version there is not special message for "non
existing value". I am using "blank field" message.

I use my patch in our corporate project and it works fine. What do
think about it?

Vladimir Kostyukov

All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
Semediawiki-devel mailing list

WikiWorks MediaWiki Consulting http://wikiworks.com

Vladimir Kostyukov

WikiWorks MediaWiki Consulting http://wikiworks.com

Vladimir Kostyukov

WikiWorks MediaWiki Consulting http://wikiworks.com