Text Validation - use of wildcard or truncation?
Posted: Fri May 29, 2009 7:19 pm
Hi All -
I have an application which creates orders based on customer demand for a given quantity on a given date. I want to be able to perform a few different validations, using a test dataset. I can successfully control all elements of the dataset, except the date I run the test, which obviously changes with each day.
Currently, I am validating on a text string, within the confirmation dialog that comes up when the user tries to place the order. That dialog says:
-------------------------------
Would you like to accept the recommended order for part 'C'?
Quantity: 298
Priority: Critical
Reorder Date: 5/21/2009
---------------------------------
I selected to validate against a caption, which came up with:
text[@caption~'^Would\ you\ like\ to\ accept\ ']
However, it still looks for the entire contents of the dialog, including the date. What I would like is to validate against a string, followed by some kind of wildcard, such as:
text[@caption~'^Would\ you\ like\ to\ accept... Date:* ']
Where anything before the "*" would have to pass validation, but whatever happens after the "*" is excluded from the validation.
Is this possible, and what are the exact steps to set this up.
Thank you SO much, in advance!
I have an application which creates orders based on customer demand for a given quantity on a given date. I want to be able to perform a few different validations, using a test dataset. I can successfully control all elements of the dataset, except the date I run the test, which obviously changes with each day.
Currently, I am validating on a text string, within the confirmation dialog that comes up when the user tries to place the order. That dialog says:
-------------------------------
Would you like to accept the recommended order for part 'C'?
Quantity: 298
Priority: Critical
Reorder Date: 5/21/2009
---------------------------------
I selected to validate against a caption, which came up with:
text[@caption~'^Would\ you\ like\ to\ accept\ ']
However, it still looks for the entire contents of the dialog, including the date. What I would like is to validate against a string, followed by some kind of wildcard, such as:
text[@caption~'^Would\ you\ like\ to\ accept... Date:* ']
Where anything before the "*" would have to pass validation, but whatever happens after the "*" is excluded from the validation.
Is this possible, and what are the exact steps to set this up.
Thank you SO much, in advance!