plwalters / aurelia-validate.js

An Aurelia plugin for validate.js expressive validation.
MIT License
5 stars 1 forks source link

& validate #13

Closed RWOverdijk closed 8 years ago

RWOverdijk commented 8 years ago

Nice work on the module :) It's a shame aurelia-validation was dropped the way it was but, I can understand it.

Reading your blog post here I found the following snippet:

<input class="form-control" value.bind="model.name & validate" />

It looks like this automatically generates the errors (which gives me happiness). I do have some questions though (seeing how your blog post said we can give our feedback on the thing):

  1. How do you know what markup to create? It now creates the proper bootstrap classes, but how do you know it's bootstrap?
  2. Is there any other way of having errors rendered? We're currently almost done with out form component (really cool btw) and now we have to add & validate for the elements.
RWOverdijk commented 8 years ago

Sooo... No explanation then?

plwalters commented 8 years ago

I just merged in a bunch of commits from aurelia/validate.js apparently one of them had a reference to an issue like Fixes #13 that wasn't valid on this repository (my own copy of it). I'll re-open and provide an explanation.

plwalters commented 8 years ago

So I've not looked at this code that much in the last few months, and keep in mind that this is my personal fork of the aurelia-validate.js bridge I worked on that has apparently been thrown out in favor of a new validation library, but -

  1. The validation-renderer is currently hard-coded with bootstrap rendering only.
  2. I believe there was a branch that had refactored the rendering out to it's own separate file and allowed the developer to specify which renderer to use through dependency injection.
  3. I don't think that process was ever fully finished so I'm copying over the changes that were going in the right direction and am going to consider re-maintaining this plugin with the vision that I had for validation. If you are looking for the new validation stuff I would peek over here
RWOverdijk commented 8 years ago

Ah I see. I thought validatejs was fine, what changed?

Anyway thank you for answering :)