Doesn't the server already send down an error message for the particular
validation failure based on what's in the template? Presumably as an
initial version of the functionality, a validation function could just
supply its own error string that would get displayed the same as any
other error.
Obviously it would be better to be able to return whatever you like and
have the client-side code execute its own logic based on the return
value. And actually I don't imagine that'd be too hard compared to the
rest of the change -- maybe just as simple as
if (! self.rifeAjaxValidationCallback ||
! rifeAjaxValidationCallback(formFieldThatCausedTheAjaxCall,
responseFromServer))
{
display the error message as before
}
But that can be a version 1.1 thing if it's more complex than that --
just having arbitrary context-sensitive server-side validation will be
huge on its own.
-Steve
Tyler Pitchford wrote:
I agree that it would be a useful idea. I actually thought of the
username example when I was first making the framework. I realized it
would be a pretty big mod, but one that's definitely worthwhile. I
settled on allowing the unique() constraint to handle conflicting
names. Obviously, this doesn't allow possible name suggestions from
RIFE. A possible solution is to add "hooks" into the JS to evaluate
the returns from RIFE. I need to brainstorm on a way to make this
smooth and with as little "extra" code as possible.
Thanks for the comments,
Tyler
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users