liorm Posted September 11, 2008 Share Posted September 11, 2008 Hi I wonder how one can do validation without postback, in PHP. In .NET, ill-validated fields are showing an error on the client browser, using javascript, without any post back (except if it's a custom validator) . Specifically, I'm using Zend. is there a way to do it here? (I mean, using some unified approach, and not by just having included javascript functions customized to every page). any other framework that does it? code samples? thanks so much for _any_ idea Lior http://www.lgorithms.com Quote Link to comment https://forums.phpfreaks.com/topic/123828-validation-without-a-postback/ Share on other sites More sharing options...
448191 Posted September 11, 2008 Share Posted September 11, 2008 There is (AFAIK) no included mechanism in ZF as of current. But, I wouldn't be hard to implement. Just add a custom decorator that triggers an ajax call instead of a post. Quote Link to comment https://forums.phpfreaks.com/topic/123828-validation-without-a-postback/#findComment-639340 Share on other sites More sharing options...
liorm Posted September 12, 2008 Author Share Posted September 12, 2008 thanks. actually, i'm looking for something simple based on javascript (that's how its done in .net). no need to use Ajax to talk to the server - there are many types of validation that can be done just on the client. for example, a required field any ideas there? thanks again Lior Quote Link to comment https://forums.phpfreaks.com/topic/123828-validation-without-a-postback/#findComment-639763 Share on other sites More sharing options...
448191 Posted September 12, 2008 Share Posted September 12, 2008 Well yeah, but it's more work: write JavaScript equivalents of the validations in ZF, then, again, use custom decorators to require client side validation before posting. It's not rocket science, but it is work. Quote Link to comment https://forums.phpfreaks.com/topic/123828-validation-without-a-postback/#findComment-639767 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.