-
Notifications
You must be signed in to change notification settings - Fork 24
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(validation): correctly validate empty not required data #1606
base: develop
Are you sure you want to change the base?
Conversation
should we link this? |
yea lets link it. |
ui/src/util/tests/validators.test.ts
Outdated
@@ -210,6 +212,29 @@ describe('Validator.doValidation - number case', () => { | |||
expect(result).toBe(false); | |||
}); | |||
|
|||
it.each([undefined, null])( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that data === ''?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the number no. But i actually created a test for it just in case in a separate PR
Co-authored-by: Viktor Tsvetkov <[email protected]>
Issue number:
https://splunk.atlassian.net/browse/ADDON-78393
PR Type
What kind of change does this PR introduce?
Summary
Changes
N/A do not throw error if number undefined and not required.
User experience
When copying entity right now correctly verify number value.
Checklist
If an item doesn't apply to your changes, leave it unchecked.