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

[3.x] Fix problems in lexicon creation form #15892

Merged
merged 3 commits into from Nov 9, 2021

Conversation

smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Nov 6, 2021

What does it do?

Made changes to lexicon processors to add simple validation logic and changed js form to make certain fields required.

Why is it needed?

As there is currently no validation of lexicon form values, records without all the required data save to the database but cannot display because of missing information.

How to test

Test this under two conditions:

  1. Disable the allowBlank properties I added to the js form; in this way you can verify that the basic php validation works when trying to create a lexicon entry with one or more blank values.
  2. Re-enable the allowBlank properties and to verify that the front end validation stops the form from submitting when required values are missing.

Note: Now only valid entries will be saved, so they will always be found in the grid when using the filtering toolbar.

Related issue(s)/PR(s)

Addresses issue #15223.

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Nov 6, 2021
@Ibochkarev Ibochkarev added this to the v3.0.0-beta1 milestone Nov 7, 2021
@Ibochkarev Ibochkarev added the pr/review-needed Pull request requires review and testing. label Nov 7, 2021
Copy link
Collaborator

@Mark-H Mark-H left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and seems to work, but it may be worth fixing up the array_map trim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants