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: Implement instance proc validators #28

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

syphax-bouazzouni
Copy link

@syphax-bouazzouni syphax-bouazzouni commented Feb 28, 2023

Context

see agroportal/project-management#393

What

Now we can call, model-specific validators.

For example, if a model defines an instance method called equal_to_10 that tests if a value is equal to 10.

Then we can reference it as a validator for an attribute, like so attribute :age, enforce: [:equal_to_10], this will enforce the attribute age to be 10 (as implemented in the method equal_to_10)

Changes

  • Add proc validator tests (f061e51)
  • implement instance proc validators (b7cccab)

@syphax-bouazzouni syphax-bouazzouni changed the base branch from master to development February 28, 2023 20:02
@syphax-bouazzouni syphax-bouazzouni merged commit 93530e5 into development Feb 28, 2023
syphax-bouazzouni added a commit that referenced this pull request Jul 8, 2023
…lidators

Feature: Implement instance proc validators
syphax-bouazzouni added a commit that referenced this pull request Sep 5, 2023
…lidators

Feature: Implement instance proc validators
syphax-bouazzouni added a commit that referenced this pull request Dec 4, 2023
…scheme file and callbacks) (#45)

* Merge pull request #23 from ontoportal-lirmm/feature/add-property-datatype-dsl

Feature: add property data type dsl

* Merge pull request #26 from ontoportal-lirmm/refactor/resources-validators

Refactor: resources validators

* Merge pull request #27 from ontoportal-lirmm/feature/implement-new-validators

Feature: Implement new validators

* Merge pull request #28 from ontoportal-lirmm/feature/implement-new-validators

Feature: Implement instance proc validators

* Merge pull request #30 from ontoportal-lirmm/feature/add-model-scheme-yml-file

Feature/add model scheme yml file

* Merge pull request #31 from ontoportal-lirmm/feature/add-models-on-update-callbacks

Feature: Add models on update callbacks
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.

1 participant