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 error when validating the form with non blocking validations #103629

Merged

Conversation

machadoum
Copy link
Member

issue: #102338

Summary

Change validationType default value of validate() function on use_field.ts file. This change makes sure that ArrayItem validations are ignored when the form.validate() is called.

Screenshot 2021-06-29 at 11 39 54
Screenshot 2021-06-29 at 11 39 33

I added tests for the form validation and also for field validation with different values for isBlocking.

Checklist

@machadoum machadoum added the bug Fixes for quality problems that affect the customer experience label Jun 29, 2021
@machadoum machadoum self-assigned this Jun 29, 2021
@machadoum machadoum force-pushed the stack-management-formlib-issue-102338 branch from 5a7e071 to 42bda1d Compare June 29, 2021 09:50
@machadoum machadoum marked this pull request as ready for review June 29, 2021 12:49
@machadoum machadoum requested a review from a team as a code owner June 29, 2021 12:49
@machadoum machadoum requested a review from sebelga June 29, 2021 12:50
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

Thanks for adding the fix for this @machadoum ! Looks great, I made a few comments in the code cheers 👍

@machadoum machadoum force-pushed the stack-management-formlib-issue-102338 branch from 42bda1d to 9cf3d17 Compare July 5, 2021 13:50
@machadoum machadoum added release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0 labels Jul 6, 2021
@machadoum machadoum force-pushed the stack-management-formlib-issue-102338 branch 2 times, most recently from 6a5d15c to e8fb07d Compare July 6, 2021 11:03
@machadoum machadoum force-pushed the stack-management-formlib-issue-102338 branch from e8fb07d to b165157 Compare July 12, 2021 13:54
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

Thanks again for the contribution @machadoum ! I think now it works as expected 👍

@machadoum
Copy link
Member Author

@elasticmachine merge upstream

@sebelga sebelga added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Jul 12, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
esUiShared 192.1KB 192.5KB +353.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @machadoum

@machadoum machadoum merged commit 516480e into elastic:master Jul 13, 2021
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 13, 2021
…-png-pdf-report-type

* 'master' of github.com:elastic/kibana: (292 commits)
  bring back KQL autocomplete in timeline + fix last updated (elastic#105380)
  [Maps] Change TOC pop-up wording to reflect filter change, not search bar change (elastic#105163)
  Updating urls to upstream elastic repo (elastic#105250)
  [Maps] Move new vector layer wizard card down (elastic#104797)
  Exclude registering the cases feature if not enabled (elastic#105292)
  [Uptime] Alerts - Monitor status alert - check monitor status by monitor.timespan (elastic#104541)
  updated UI copy (elastic#105184)
  Log a warning when documents of unknown types are detected during migration (elastic#105213)
  [Logs UI] Register log threshold rule as lifecycle rule (elastic#104341)
  [Ingest pipelines] add network direction processor (elastic#103436)
  [Console] Autocomplete definitions (manual backport) (elastic#105086)
  [Security Solution] User can make Exceptions for Memory protection alerts (elastic#102196)
  [Lens] Formula: add validation for multiple field/metrics (elastic#104092)
  Removing async from file upload and data visualizer plugins start lifecycle (elastic#105197)
  Fix error when validating the form with non blocking validations (elastic#103629)
  [ML] Fix "View by" swim lane with applied filter and sorting by score  (elastic#105217)
  Update dependency @elastic/charts to v32 (elastic#104625)
  [CTI] shortens large numbers on Dashboard Link Panel (elastic#105269)
  [Security Solution][Endpoint][Host Isolation] Fixes bug to remove excess host metadata status toasts on non user initiated errors (elastic#105331)
  [Cases] Fix pushing alerts count on every push to external service (elastic#105030)
  ...

# Conflicts:
#	x-pack/plugins/reporting/common/types.ts
machadoum added a commit to machadoum/kibana that referenced this pull request Jul 13, 2021
…stic#103629)

* Fix error when validating the form with non blocking validations

issue: elastic#102338

* Add a flag to only validate blocking validation when validating the form

* Refactor bypass validation

Co-authored-by: Sébastien Loix <sabee77@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
machadoum added a commit that referenced this pull request Jul 13, 2021
…3629) (#105478)

* Fix error when validating the form with non blocking validations

issue: #102338

* Add a flag to only validate blocking validation when validating the form

* Refactor bypass validation

Co-authored-by: Sébastien Loix <sabee77@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Sébastien Loix <sabee77@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@cjcenizal
Copy link
Contributor

@sebelga Should this be backported to 7.14?

@sebelga
Copy link
Contributor

sebelga commented Jul 26, 2021

I don't think so this was not critical and an enhancement in a security form. @machadoum correct me if I'm wrong.

@machadoum
Copy link
Member Author

I agree with @sebelga. It is a small improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants