Posted: 3 months ago Quote
Right now the "Text Prompt" for an attribute shows up as both the label as well as the error message on validation.

I'd like to be able to set the text prompt so something like:

Select Dimension:

and have the validation error mesage be:

"Please select dimension."


This will require a schema change to accommodate, but it should be a pretty straightforward migration. You can add a new "RequiredErrorMessage" column to ProductVariant_ProductAttribute_Mapping table and then fill it with the value of TextPrompt column. Those that want to override the error message can do so by change the value in RequiredErrorMessage.

Better yet, maybe there can be a new table for product attribute validation that stores multiple validation criteria with their respective validation error message for each attribute.

For instance, if the attribute uses a textbox, I want to be able to add multiple validation rules:
-Can't be blank (i.e. required)
-Must be numeric
-Must be greater than zero
-Must be less than n
-etc.

For each one of these validation rules, I want to be able to set the validation error message.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)