-
Notifications
You must be signed in to change notification settings - Fork 4
Condition validation is not 100% correct #12
Copy link
Copy link
Open
Description
Hi!,
While working on rivescript-php i was porting your checkSyntax function.
if ($line !~ /^.+?\s*(==|eq|!=|ne|<>|<|<=|>|>=)\s*.+?=>.+?$/) {
return "Invalid format for !Condition: should be like `* value symbol value => response`";
}This does not validate the usage of the == | != | ne | <> | < | <= | > | >= | characters.
The following script gets passed validation while the syntax of whats supposed to be eq male now says bleep male.
+ set gender
- <set gender=male>thank you
+ what is my gender
* <get gender> bleep male => You told me you were a boy.
* <get gender> eq female => You told me you were a girl.
- You never told me what you were.
I have tested this in the live testing environment as well and i didn't get any errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels