On Tue, Oct 6, 2009 at 11:36 AM, Hans <[email protected]> wrote:
>
>> The second allows you test a field by some pattern and trigger actions
>> to fields (1 & 2) if it passes, or other fields (3) if it fails.
>> Usually there is a
>>
>> [session warn]
>>
>> line before any actions take place and you simple assign an error
>> message when a validation fails.
>
> Please explain how error messages can be assigned in the form.

if you had

[session validate_field1 "/somepattern/ ?  : warn=This thing don't fit"]
[session warn]

When the validation fails the field warn gets reset to the warning
message. If '', the line gets skipped. If set to some value it is
triggered and aborts.  The message appears in the page wherever you
have the markup [messages].  All messages get squished together into
one string.

> Can they be placed besides the field which input validation failed?

Not currently. It might be interesting to have [messages msg_id] and
then replace the markup with the appropriate message. Very cool idea.
Not sure what would be involved however...

> And how would I check if an input matches against the list of 'command
> words' of BW?

Not that I know of.  Actually, in php you could do

if (function_exists("BOLTX$func"))...

> Is there a list of these special command words whic can be accessed in
> the input validation?

Not that I know of other than /(source|edit|...)/

> I suppose in [session validate_field1 "/somepat/" ....]  the pattern
> is regex, and i could give  along line like
> (create|edit|delete|rename|...........). A variable for this would be handy.

No idea how to generate a list of all the commands, considering plugins.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to