amrali / parsleyjs-meteor Goto Github PK
View Code? Open in Web Editor NEWMeteor packaging for Parsley.js
Meteor packaging for Parsley.js
Updated to Meteor 1.0.1 and know I'm getting the following error
Which is happing on $('#form').parsley({trigger: 'change'});
Exception from Tracker afterFlush function: undefined is not a function
TypeError: undefined is not a function
at Template.editProducer.rendered (http://localhost:3000/client/templates/producers/edit_producer.js?bf33ee7575b877fc3d66d5eedaa6a2dbc7b4d55f:8:16)
at null. (http://localhost:3000/packages/blaze.js?77c0809654ee3a10dcd5a4f961fb1437e7957d33:2970:21)
at http://localhost:3000/packages/blaze.js?77c0809654ee3a10dcd5a4f961fb1437e7957d33:1720:14
at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?77c0809654ee3a10dcd5a4f961fb1437e7957d33:2029:12)
at http://localhost:3000/packages/blaze.js?77c0809654ee3a10dcd5a4f961fb1437e7957d33:1719:15
at Tracker.flush (http://localhost:3000/packages/tracker.js?192a05cc46b867dadbe8bf90dd961f6f8fd1574f:438:11)
Any chance for a quick update to parsley 2.0.6 which has an important fix
guillaumepotier/Parsley.js#731 and guillaumepotier/Parsley.js#508
Can you post an example with the js file and the HTML files? I'm having trouble knowing if I've got all the pieces in place to really make this work. Also, so far many of the part of my validation aren't working at all or aren't working right. If you have any forms that also use bootstrap for the error styling that would be great to see.
Thanks
Are you supporting locale IE
$('#form').parsley({setLocale: 'es'});
Problem:
Meteor projects with parsley.js get stuck in an infinite loop when deployed to meteor.com.
Reproduce:
Additional information:
The console keeps spitting out this line:
[Error] TypeError: 'undefined' is not a function (evaluating 'e({})') (anonymous function) (dafc4383c652b6f17d22782ef02fafa568724d64.js, line 7)
Your references are not working.
installing from mrt you get :
error: File not found: parsleyjs/parsley.js
error: File not found: parsleyjs/parsley.extend.js
I'm getting this error in the console on startup.
"Uncaught TypeError: undefined is not a function parsley.min.js:9"
Not sure what's going with it. The only dependency is jquery and the package.js lists it as a dependency, so it should be getting loaded first.
No code written to actually use the package yet, although I attempted to bind a form manually from the console and it throws the same error.
Package should look like this right? I'm seeing a $.extend is not defined.
Package.describe({
summary: "Javascript forms validation. Powerful, UX aware, and dead simple."
});
Package.on_use(function (api) {
api.use('jquery', 'client');
api.add_files('parsley.min.js', 'client');
api.add_files('parsley.remote.min.js', 'client');
});
Or should I use https://github.com/Sewdn/meteor-parsleyjsv2/ ?
For some reason the tagged version (v2.0.2) doesn't seem to have an updated package.js file with the api.use('jquery', 'client') call in it.
The code in master is correct, so I can't really pull request to fix it.
Error: The version 2.0.3 of package parsley.js has not yet been migrated
When upgrading to version 0.9.0 of meteor I get the above error when I run the mrt migrate-app. Please take a look at this.
Thanks
This is great, thanks for wrapping up this JS library.
I am seeing the onFieldError listener execute twice on a single field failure.
Example: A form which has one required field, e.g.
<input class="form-control" data-required="true" data-type="email" data-required-message="{{errorEmailRequired}}"...
The form is setup in the rendered callback:
parsleyOptions = {
// Sets success and error class to Bootstrap class names
successClass: '',//'has-success',
errorClass: 'has-error has-feedback',
trigger: 'change',
// Bootsrap needs success/error class to be set on parent element
errors: {
classHandler: function ( elem, isRadioOrCheckbox ) {
// specify where parsley error-success classes are set
return $(elem).parents(".form-group");
},
// Set these to empty to make sure the default Parsley elements are not rendered
errorsWrapper: '',
errorElem: ''
},
listeners: {
onFieldValidate: function ( elem ) {
// remove the X from onFieldError if it's there
elem.next( ".glyphicon-remove" ).remove();
},
onFieldError: function ( elem, constraints, parsleyField ) {
// add the Bootstrap X glyphicon to the right side of the form element
elem.after( '<span class="glyphicon glyphicon-remove form-control-feedback"></span>' );
// access the data-required-message="xx" attribute on the field
throwError( 000, "", elem.data('required-message' ) );
},
// onFieldSuccess: function(elem, constraints, parsleyField) {
// elem.next().remove( 'form-control-feedback' );
// }
}
};
Template.contactsAddOrEdit.rendered = function() {
$( '#contactsAddOrEditForm' ).parsley( parsleyOptions );
};
When the field failure happens, onFieldError is called twice resulting in two errors to the user. (throwError goes to a local errors collection, straight from the Meteor book example.)
Any thoughts?
Could you please add a license so that others can use this package? Publishing software without a license means that anyone attempting to use it would be in violation of copyright. If you could please add a MIT or other distribution-friendly license, that would be appreciated!
Thanks
when trying to add the package I'm getting the following error message
/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:63
throw('No version ' + version + ' of package ' + self.name + ' was found
Probably a parsleyjs thing, but in bootstrap 4 "toggle button bar" styled radio buttons will stack the radio buttons vertically i.e.
You want (to appear as buttons):
radio1 radio2 radio 3
becomes
radio 1
radio2 radio 3
The code:
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-success-outline active">
<input type="radio" name="scheduleType" id="scheduleType1" autocomplete="off">Flexible
</label>
<label class="btn btn-success-outline checkbox-inline">
<input type="radio" name="scheduleType" id="scheduleType2" autocomplete="off">Fixed
</label>
</div>
Looking at the html, it appears parsley inserts a
<ul id='parsley-id-multiple-RADIONAME'>
after the first radio, which breaks the layout.
The workaround, unless there is a way to skip validation on a control, is to put
Template.THEAFFECTEDTEMPLATE.onRendered(function (){
$('#parsley-id-multiple-scheduleType').remove();
});
Seems to work, but haven't fully tested it
I get the following error after installing the most recent version of this package:
=> Errors while scanning packages:
While building package parsley.js
:
parsley.remote.min.js:6:1: Unexpected token <
After executing mrt add parsley.js
i got the following message
=> Errors while scanning packages:
While building package parsley.js
:
error: File not found: parsleyjs/parsley.js
error: File not found: parsleyjs/parsley.extend.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.