-
Notifications
You must be signed in to change notification settings - Fork 115
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
form or field validation #53
Comments
Looking at the client/lib/form_utils.js I see that you have a placeholder for a custom validation callback: |
Hi Anthony, unfortunatelly no way to pass custom validation to the kitchen. But You can do something server-side: in collection.before_insert_code do your validation and throw new Meteor.Error(...) on error. On submit, error message will be shown in form header (form field will not be marked red and focused). P.S. all issues you reported are usefull issues - "must have" features, and when I finish this marathon (visual UI designer) and started improving quality of generated code, first thing I will do is to fix issues you reported. Thank you! |
Ok, I’ll try that thanks.
I had actually just started messing with converting to collection2 and using simple schemas to validate everything, probably a bad idea since you’ve marked this as ‘experimental’, right?
Be well.
Tony
On Apr 14, 2017, at 11:00 AM, Petar Korponaić <notifications@github.com<mailto:notifications@github.com>> wrote:
Hi Anthony, unfortunatelly no way to pass custom validation to the kitchen. But You can do something server-side: in collection.before_insert_code do your validation and throw new Meteor.Error(...) on error. On submit, error message will be shown in form header (form field will not be marked red and focused).
P.S. all issues you reported are usefull issues - "must have" features, and when I finish this marathon (visual UI designer) and started improving quality of generated code, first thing I will do is to fix issues you reported. Thank you!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#53 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH95W7e6BzJME7WD7ZeqO6mCwB7gOuibks5rv7QhgaJpZM4M9MSf>.
|
Hi Perak, |
Glad you solved this 👍 I added two cards to my Trello board:
|
Hi, |
Selecting required fields and styling those labels only without having the input and label directly adjacent is not possible with current CSS. I had to create the selector at the div level instead. |
Hi,
I'm wondering how to implement a custom validation (unique value for a particular field) with the form or collection component.
I'm guessing you have done this before, so I don't want to reinvent this process.
Thanks!
The text was updated successfully, but these errors were encountered: