Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update remote-method.xml #12

Closed
wants to merge 1 commit into from

Conversation

sparky672
Copy link
Contributor

There is a lot of confusion surrounding proper usage of the remote method based on the number of Stack Overflow questions about it. I am proposing this slight change to help clarify.

Proposed:

The serverside response must be a JSON string that must be "true" for valid elements, and can be "false", undefined, or null for invalid elements, using the default error message. If the serverside response is a string, eg. "That name is already taken, try peter123 instead", this string will be displayed as a custom error message in place of the default.

There is a lot of confusion surrounding proper usage of the `remote` method based on the number of Stack Overflow questions about it.  I am proposing this slight change to help clarify.

Proposed:

The serverside response must be a JSON string that must be `"true"` for valid elements, and can be `"false"`, `undefined`, or `null` for invalid elements, using the default error message.  If the serverside response is a string, eg. `"That name is already taken, try peter123 instead"`, this string will be displayed as a custom error message in place of the default.
@washamdev
Copy link

Yes, this would make a lot more sense and lessen confusion.

@jzaefferer
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants