Added validation around pwd_secure_complexity
#14502
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a small amount of validation around the
pwd_secure_complexity
field when updating settings to ensure unexpected data is not stored.This will only pop up if users manually change the html of the form but adds a layer of protection:
![Screenshot of error messages on settings page](https://private-user-images.githubusercontent.com/1141514/317012104-512b48a5-11d0-49d0-9858-10ecd898e449.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0OTk2NDcsIm5iZiI6MTczOTQ5OTM0NywicGF0aCI6Ii8xMTQxNTE0LzMxNzAxMjEwNC01MTJiNDhhNS0xMWQwLTQ5ZDAtOTg1OC0xMGVjZDg5OGU0NDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMDIxNTQ3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjE5NGQzMWRhOTcwMjRmZGQzZTdjZjkyZDliMTQ5OTkyMjQ1MmY3MDMwMGU0MWQ5MDhlYjk1NzdjM2MwNDFjZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.yHF2-e2Mafzl6fPdNz872ayAXYuanGAtTrDuNzh1sos)
Type of change