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

docs: improve widget custom validation sample #1911

Merged
merged 1 commit into from
Nov 26, 2018
Merged

docs: improve widget custom validation sample #1911

merged 1 commit into from
Nov 26, 2018

Conversation

karolis-sh
Copy link

@karolis-sh karolis-sh commented Nov 26, 2018

Thx for maintaining this awesome project!

Summary

After trying to implement custom validation (https://www.netlifycms.org/docs/custom-widgets/#advanced-field-validation), I couldn't display my error messages. Only after checking the source code I understood that the returned error object needs to have message field. So I added this clarification to the docs.

Test plan

Before:
image

After:
image

A picture of a cute animal (not mandatory but encouraged)

Sup!

image

@verythorough
Copy link
Contributor

Deploy preview for netlify-cms-www ready!

Built with commit 76ea163

https://deploy-preview-1911--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

Deploy preview for cms-demo ready!

Built with commit 76ea163

https://deploy-preview-1911--cms-demo.netlify.com

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@erquhart erquhart merged commit 5e2ce34 into decaporg:master Nov 26, 2018
@karolis-sh karolis-sh deleted the improve-docs branch November 27, 2018 05:20
LoicMahieu added a commit to LoicMahieu/netlify-cms that referenced this pull request Nov 29, 2018
* official/master: (42 commits)
  chore: improve publish scripts
  Publish
  chore: test before publishing
  chore(netlify-cms-core): upgrade react-dnd to 7.x (decaporg#1922)
  chore(netlify-cms-widget-text): upgrade to react-textarea-autosize 7.x (decaporg#1921)
  chore(netlify-cms-core): upgrade to react-waypoint 8.x (decaporg#1920)
  fix(backend): use singular label in custom commit message (decaporg#1917)
  docs: add GAE-specific oAuth client (decaporg#1918)
  fix(netlify-cms-widget-text): set correct font family (decaporg#1916)
  chore(netlify-cms-core): upgrade redux and related dependencies (decaporg#1914)
  chore(dependencies): bump npm-run-all (decaporg#1913)
  fix(netlify-cms-core): fix identifier field validation (decaporg#1907)
  docs: improve widget custom validation sample (decaporg#1911)
  improvement(backends): changes for registerBackend compatibility (decaporg#1880)
  fix(netlify-cms-core): fix prop-types warnings (decaporg#1906)
  fix(a11y): correct label "for" references to fields (decaporg#1904)
  improvement(netlify-cms-core): wrap navigations in lists for better a11y (decaporg#1903)
  fix(netlify-cms-widget-markdown): add missing border radius on toolbar (decaporg#1905)
  fix(netlify-cms-core): remove double focusable elements on profile menu button (decaporg#1900)
  fix(config): remove identifier field validation (decaporg#1882)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants