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

feature UGN-213 - add validations #16

Merged
merged 3 commits into from
Feb 18, 2022
Merged

feature UGN-213 - add validations #16

merged 3 commits into from
Feb 18, 2022

Conversation

masiulis
Copy link
Contributor

  • run validations at the start and on every change
  • add 3 levels of errors

Screenshot 2022-02-17 at 15 09 42

@masiulis masiulis requested a review from JulitorK February 17, 2022 13:10
@linear
Copy link

linear bot commented Feb 17, 2022

UGN-213 Run Validation

field.validations?.forEach((validation) => {
switch (validation.rule) {
case "unique": {
const values = data.map((entry) => entry[field.key])
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume we will write tests for validations so it will be a good idea to abstract these to separate functions.
Ok for now, but will need to refactor

@masiulis masiulis merged commit 2fb66f8 into master Feb 18, 2022
@masiulis masiulis deleted the UGN-213 branch February 18, 2022 10:18
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