[jQuery] Re: validation plugin : conflict with formsess because of {
This is more a smarty issue, than jquery/js. There is a smarty tag {ldelim} for { and {rdelim} for }. Also wrapping a piece of code with {literal}function() { code; } {/ literal} tells the parser to ignore the text between the tags. Regards, Emil Ivanov On 28 Авг, 11:05, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier
[jQuery] Re: validation plugin : conflict with formsess because of {
You could try adding this in $(document).ready, before calling the validate plugin: $.meta.cre = /(\[.*\])/; $(#foo).validate(); Although that is not documented in the meta data plugin (maybe there should be an option in it to do that). On Aug 28, 9:05 am, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier
[jQuery] Re: validation plugin : conflict with formsess because of {
I'll do that as a workaround if there is no nice solution. Its just that inline validation seems easier to maintain in the futur in the app I have because it is made of a lot of templates and a maintainer that dont know the app well maybe lost at finding where the validation come from. On 8/28/07, David Duymelinck [EMAIL PROTECTED] wrote: Is it an option for you to not use the meta data plugin? The rules can be set without it too. $(#Form).validate({rules: {inputname: required}}); --David Olivier Percebois-Garve schreef: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.484 / Virus Database: 269.12.10/976 - Release Date: 27/08/2007 18:20 -- David Duymelinck [EMAIL PROTECTED]
[jQuery] Re: validation plugin : conflict with formsess because of {
Is it an option for you to not use the meta data plugin? The rules can be set without it too. $(#Form).validate({rules: {inputname: required}}); --David Olivier Percebois-Garve schreef: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.484 / Virus Database: 269.12.10/976 - Release Date: 27/08/2007 18:20 -- David Duymelinck [EMAIL PROTECTED]
[jQuery] Re: validation plugin : conflict with formsess because of {
How about: $.meta.cre = /((?!\[)(.*)(?=\]))/; This will fail if you use class=foo [required: true] but should be fine with class=[required: true] foo For it to work like it does with {} (class names before and after are ignored), the meta data plugin would probably be have to be modified. On Aug 28, 1:25 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Thanks for your answers. Emil you are right at saying that it is not a jquery issue. Its even more a formsess issue than a smarty issue, and thats why your solution wont work.Because of the formsess filters it produces something like: ##FS_SMARTY_LDELIM##ldelim##FS_SMARTY_RDELIM##required: true##FS_SMARTY_LDELIM##rdelim##FS_SMARTY_RDELIM## So I'm looking more for a jquery solution. Sam your solution goes in the direction I'm looking for, but it produces an error: I tried with class=[required: true] and added $.meta.cre = /(\[.*\])/; in the jQuery(document).ready( Firebug says : invalid property id https://xxx.nondisclosabledomainname.com/subscription_new/js/jquery.m... Line 98 in green: data = {[required: true]} -Olivier On 8/28/07, Sam Collett [EMAIL PROTECTED] wrote: You could try adding this in $(document).ready, before calling the validate plugin: $.meta.cre = /(\[.*\])/; $(#foo).validate(); Although that is not documented in the meta data plugin (maybe there should be an option in it to do that). On Aug 28, 9:05 am, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier
[jQuery] Re: validation plugin : conflict with formsess because of {
Great ! Thanks a lot. It just work like you said. foo [required: true] breaks, but [required: true] foo works like a charm. PS: I'm amazed by the jquery mailing. Coolness and quality people. Quite different to a php-pastry related I'm used too, where you never now when and why it starts flaming all around -Olivier On 8/28/07, Sam Collett [EMAIL PROTECTED] wrote: How about: $.meta.cre = /((?!\[)(.*)(?=\]))/; This will fail if you use class=foo [required: true] but should be fine with class=[required: true] foo For it to work like it does with {} (class names before and after are ignored), the meta data plugin would probably be have to be modified. On Aug 28, 1:25 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Thanks for your answers. Emil you are right at saying that it is not a jquery issue. Its even more a formsess issue than a smarty issue, and thats why your solution wont work.Because of the formsess filters it produces something like: ##FS_SMARTY_LDELIM##ldelim##FS_SMARTY_RDELIM##required: true##FS_SMARTY_LDELIM##rdelim##FS_SMARTY_RDELIM## So I'm looking more for a jquery solution. Sam your solution goes in the direction I'm looking for, but it produces an error: I tried with class=[required: true] and added $.meta.cre = /(\[.*\])/; in the jQuery(document).ready( Firebug says : invalid property id https://xxx.nondisclosabledomainname.com/subscription_new/js/jquery.m... Line 98 in green: data = {[required: true]} -Olivier On 8/28/07, Sam Collett [EMAIL PROTECTED] wrote: You could try adding this in $(document).ready, before calling the validate plugin: $.meta.cre = /(\[.*\])/; $(#foo).validate(); Although that is not documented in the meta data plugin (maybe there should be an option in it to do that). On Aug 28, 9:05 am, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi I'm having an issue with the validation plugin. It conflicts with a smarty-based php class named formsess. It does not allow signs such as { in form tags. Sounds like hell to go modify formsess, so I hope to find a way to change that in the validation plugin. Could it be possible to replace class={required: true} with class=[required: true] ? thanks -Olivier