Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

External validator function #929

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

Open
clmntr wants to merge 1 commit into json-schema-form:development
base: development
Choose a base branch
Loading
from clmntr:patch-1

Conversation

Copy link

@clmntr clmntr commented Sep 26, 2017
edited
Loading

Add the possibility to have an external validator function by passing to the validator an expression. Such as :
"$validators" : {
"equalsEmail" : "mustBeEqual(modelValue, 'email')"
}

Description

Add your description here

Fixes Related issues

  • add related
  • issues here

Checklist

  • I have read and understand the CONTRIBUTIONS.md file
  • I have searched for and linked related issues
  • I have created test cases to ensure quick resolution of the PR is easier
  • I am NOT targeting main branch
  • I did NOT include the dist folder in my PR

@json-schema-form/angular-schema-form-lead

Add the possibility to have an external validator function by passing to the validator an expression. Such as :
"$validators" : {
 "equalsEmail" : "mustBeEqual(modelValue, 'email')"
}
Copy link
Member

@BulletAnt thanks for this, could you add a quick test case or show me a plunker that shows it working I can make a test case from?

Copy link
Author

clmntr commented Sep 28, 2017

Sure, will do it when I have some time ;)

Anthropic reacted with thumbs up emoji

Copy link
Author

clmntr commented Nov 7, 2017

Hi!

I finally took the time to create a plunker that shows the "external" validator.
Here you go: https://plnkr.co/edit/izM9FPnz8O3IewgquxZd

Plus, in my project version (based on the bower version) I also added this to the parsers, and allow the $validators/$parsers/etc... definition directly in the schema. As I use one schema for two forms, it is easier to define those in the schema instead of the form. Let me know if you want me to add this in another PR.

Cheers

Copy link
Author

clmntr commented Jan 9, 2018

Hi @Anthropic, and Happy New Year !

Do you have any update on this PR ? Should I review some parts ?

Cheers

Copy link
Member

Hi @BulletAnt thanks for the nudge, I missed your Nov update! I'll take a look shortly, Nov-Jan were a write-off unfortunately, way too busy with work and then holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@DevLengend DevLengend DevLengend approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /