https://info.sapien.com/index.php/guis/ ... g-the-form
says this:
"Set $_.Cancel to $true when the validation is successful and you wish to continue.
Set $_.Cancel to $false if you wish to cancel the action because of a validation failure."
Isnt it the other way around?
Form validation doco
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Form validation doco
Thank you for bringing the document inconsistency to our attention. The document has been updated.
Go to full postRe: Form validation doco
Please reread the page carefully. You may also want to look at how events are routed in forms. What is the next event after "Validating"?
WHen validation fails we want to stop(cancel) processing the event.
WHen validation fails we want to stop(cancel) processing the event.
Re: Form validation doco
Its the sentence after that that appears contradictory:
"If the Cancel property is set to True in the Validating event, all events that would usually occur after the Validating event are suppressed. In other words, the validating control will retain the focus until the user provides the correct format, even if the user clicks another control such as a button or textbox. I.e., the caret will remain in the textbox until the user enters the correct format."
"the caret will remain in the textbox until the user enters the correct format"
... does not appear to sit with:
Set $_.Cancel to $true when the validation is successful and you wish to continue.
"If the Cancel property is set to True in the Validating event, all events that would usually occur after the Validating event are suppressed. In other words, the validating control will retain the focus until the user provides the correct format, even if the user clicks another control such as a button or textbox. I.e., the caret will remain in the textbox until the user enters the correct format."
"the caret will remain in the textbox until the user enters the correct format"
... does not appear to sit with:
Set $_.Cancel to $true when the validation is successful and you wish to continue.
Re: Form validation doco
Never-the-less, that is how event routing works in Windows. It has always worked like that. "Cancel" means stop processing all related events in the validation chain. Other events will not be affected.
Set $_.Cancel equal to $true when you wish to STOP processing events.
Set $_.Cancel equal to $true when you wish to STOP processing events.
Re: Form validation doco
If we consult the ultimate source of truth:
https://learn.microsoft.com/en-us/dotne ... validating
... the C# code sets Cancel to True when validation of the email address has FAILED.
Yet the Sapien doco says:
"Set $_.Cancel to $true when the validation is successful"
They cannot both be true.
https://learn.microsoft.com/en-us/dotne ... validating
... the C# code sets Cancel to True when validation of the email address has FAILED.
Yet the Sapien doco says:
"Set $_.Cancel to $true when the validation is successful"
They cannot both be true.
Re: Form validation doco
Thank you for bringing the document inconsistency to our attention. The document has been updated.
Jett
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Form validation doco
Couldn't get my thick head to see that you were criticizing the documentation and not how to use the event.
Take two points and a chocolate chip cookie. I need one more lemon to make lemonade.
Take two points and a chocolate chip cookie. I need one more lemon to make lemonade.