Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : When using multilingual option for event fields, all required language fields should be validated [SDESK-6869] #1788

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

devketanpro
Copy link
Member

No description provided.

…anguage fields should be validated [SDESK-6869]
@devketanpro devketanpro marked this pull request as ready for review April 21, 2023 11:16
@petrjasek petrjasek added this to the 2.7 milestone Apr 24, 2023
@MarkLark86
Copy link
Collaborator

Play around with those errors, as they still aren't showing up in the form (tried this locally).
The following should be visible upon errors:
image

See how the field in the form is highlighted red, with a message underneath stating that this field is required.
It would be good to have the same for multilingual fields too.

I believe this is done using the errors variable, and the key should be <field>.<language> for multilingual errors.
i.e.
errors['name.en'] = gettext('This field is required')
See the following attributes passed (shown via React dev tools)
image

@devketanpro devketanpro merged commit 59b51cd into superdesk:develop Apr 28, 2023
@devketanpro devketanpro deleted the SDESK-6869 branch November 22, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants