InputFilterBase
Base for input filters — they reject characters as they are typed (digits-only, email chars, …) by subscribing to UniTextEditable.InputFilter. A separate concern from validation (InputValidatorBase), which lets input through and judges the whole value for a visible status.
Remarks
Derived Types(5)
Types that inherit from InputFilterBase.
public KeyboardType PreferredKeyboardType{ get }Preferred mobile keyboard type. The input field uses this when no NativeKeyboardBehavior overrides it.
public abstract bool Allows(in EditProposal proposal)Whether the proposed edit may be applied, judged on the post-state it produces. Return false to drop it; the editor then discards it without firing TextChanged. Pure deletions never reach this — character filters do not block deleting.
protected static bool DocumentContains(in EditProposal proposal, int targetCodepoint)Returns true if the document text SURVIVING the proposal (everything outside EditProposal.ReplacedRange) contains targetCodepoint — the post-state membership test, minus the inserted text the filter is already iterating. O(document length) per call: chunked span scans keep the constant small, but a custom filter calling this per inserted character on a multiline document is O(n) per keystroke.
protected static bool AcceptsLeadingSign(in EditProposal proposal, int insertedCharOffset, char sign)Whether a sign char at insertedCharOffset within EditProposal.Inserted ends up as a single leading sign in the post-state: first inserted char, nothing surviving before it, no other sign surviving. Shared by the numeric filters.
