Skip to content

Validation docs: listeners, polls and back are covered; wildcard validateOnly() - #613

Open
wojt-janowski wants to merge 1 commit into
NativePHP:mainfrom
wojt-janowski:docs/validation-listeners
Open

wojt-janowski wants to merge 1 commit into
NativePHP:mainfrom
wojt-janowski:docs/validation-listeners

Conversation

@wojt-janowski

Copy link
Copy Markdown
Contributor

Docs for NativePHP/mobile-air#689 and NativePHP/mobile-air#690, both follow-ups to #614. Merge this once those land; the version labels say 4.9, so adjust them if they ship in a different release.

Validation page (digging-deeper/validation.md)

  • Wildcard rules in validateOnly() (mobile-air#689): the aside said validateOnly('items.0.name') doesn't match an items.*.name rule. It now says it does since 4.9, with each * standing for one segment, and keeps the 4.7/4.8 advice to use validate() there.
  • Which handlers are covered (mobile-air#690): the list now includes #[On] / #[OnNative] listeners and ->on() closures, handlers a child's event runs (through #[On] or an @event attribute on the child's tag), #[Poll] methods and onBackPressed(). Lifecycle hooks such as mount() and onResume() are still listed as not covered. A line says what 4.7 and 4.8 covered.
  • Child components: the aside about emit() putting a parent's messages in the child's bag is replaced by a short section. Each handler is covered by the component it belongs to, the child's handler carries on after emit(), and a parent without the trait shows the error overlay. The old behaviour is kept in an aside for 4.7 and 4.8.
  • Testing: names emitNative(), firePoll() and pressBack() as going through the same handlers.

php artisan test --filter=Documentation passes.

This branch has not been deployed

No deployments
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.

1 participant