Skip to content

Conversation

@notoriaga
Copy link
Contributor

Originally attempted to build something that checked if the input was valid, and if it wasn't it changed the highlight color from orange to red. Then I realized they had built in validators... These ones work differently though, they just don't let you type in invalid text at all. So if its an int field and you type letters they just don't register as key presses.

@notoriaga notoriaga changed the title add validator to settings text field add validator to settings text field [CPP-388] Oct 26, 2021
@notoriaga notoriaga force-pushed the steve/settings-validation branch from 8bc15f7 to 5326614 Compare October 26, 2021 17:09
@notoriaga notoriaga force-pushed the steve/settings-validation branch from 5326614 to 06bf488 Compare October 26, 2021 17:10

}

floatValidator: DoubleValidator {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can add upper/lower bounds for the numbers and a regex for the string validators, but this is probably as specific as we can be given the info from the settings yaml

@notoriaga
Copy link
Contributor Author

Out of LFS bandwidth 😱

@notoriaga notoriaga requested a review from a team October 26, 2021 17:15
Copy link
Collaborator

@john-michaelburke john-michaelburke left a comment

Choose a reason for hiding this comment

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

👍

@notoriaga notoriaga merged commit ede25bf into main Oct 26, 2021
@notoriaga notoriaga deleted the steve/settings-validation branch October 26, 2021 17:38
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.

2 participants