Currently when the user adds another generator reference title to their prompt, the reference is NOT validated but it will still display it as a valid reference. This task will add validation logic check to if the reference in the prompt is a valid widget title to reference
If the reference being used is not valid, then we should display a warning on the widget telling the user which reference used is not valid
Architectural Guidance
You will need to add a new public property ListInvalidReferences on the WidgetGenerator component
This new event callback will trigger a validation that occurs in the parent component where it will loop through all of the generators and see if there is one with that title.
If all of them are found, the validation method will return back null.
If there are any that are not found, the validation method will return an IEnumerable<string> containing all of the invalid references
The parent component will then set the InvalidReferences property on the child WidgetGenerator component
You'll then add logic here to display the message The following references are invalid: {DISPLAY_INVALID_REFERENCES}
Overview
Currently when the user adds another generator reference title to their prompt, the reference is NOT validated but it will still display it as a valid reference. This task will add validation logic check to if the reference in the prompt is a valid widget title to reference
If the reference being used is not valid, then we should display a warning on the widget telling the user which reference used is not valid
Architectural Guidance
You will need to add a new public property List
InvalidReferences
on the WidgetGenerator componentYou will need to add a new
EventCallback
that will trigger when the user updates the prompt and adds a referenceThis new event callback will trigger a validation that occurs in the parent component where it will loop through all of the generators and see if there is one with that title.
IEnumerable<string>
containing all of the invalid referencesThe parent component will then set the
InvalidReferences
property on the child WidgetGenerator componentYou'll then add logic here to display the message
The following references are invalid: {DISPLAY_INVALID_REFERENCES}
Exit Criteria
The help text will display if there is an invalid reference in the prompt