Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

jQuery validator plugin

Also, I too am a little confused on how I can use this plugin without having to create all the desired controls within an html component. I want to use this plugin on controls made by the visual editor. Is this possible? If not, what are some alternatives to achieve validation?

I believe validation is very important, and also it should not be a clunky piece of code on every button on every page. A tutorial would be very helpful.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

jQuery validator plugin

I know this is a big question, so I would like to make it quicker to answer for you.
I have the following code to use to validate some components on a dialog called "lineitem_add_dlg". The create service is invoked by the button "create_button" and there are two inputs on it, name_input and details_input.

$('#form1').validate({
rules: {
name_input: {
required: true
},
details_input: {
required: true
},
},
messages: {
name_input: {
required: "Please enter the line item name"
},
details_input: {
required: "Please enter the line item details"
},
},
errorPlacement: function (error, element) {
error.appendTo(element.parent().prev());
},
submitHandler: function (form) {
$(':mobile-pagecontainer').pagecontainer('change', '#success', {
reload: false
});
return false;
}
});

How could I modify this code for it to work with appery?

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

jQuery validator plugin

Could I get some help on this please? I seem to be having an issue when it comes to catering code I find to work with what Appery makes.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

jQuery validator plugin

You can ignore them, these are just warnings.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

jQuery validator plugin

To be able to use a visual editor components with external JS library, the input data should be modified, because it wasn't made for Appery.io builder originaly.
If it needs some particular HTML structure to validate fields, it is better to use HTML component with needed HTML structure inside it.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

jQuery validator plugin

Hi Jack -

Perhaps someone from community has integrated this library with Appery.io project and can share his solution.

But unfortunately, this custom implementation falls outside the scope of our standard support.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

jQuery validator plugin

Illya,

Thank you for your replies, both of them. I will see what I can figure out on my own as I get more familiar with JS, jQuery and Appery and I will post any results back here.

Return to “Issues”