Fray Electron
    Preparing search index...

    Function parseScrubbingText

    • Validates typed text against the field's units. A unit-less field drops any unit ("10px" becomes 10); a field with units rejects units it does not list and defaults a missing unit to its first.

      Parameters

      • text: string

        Typed or stored text.

      • rules: ScrubbingRules

        Field rules.

      • stored: boolean = false

        Whether the text is a stored value, whose unit-less numbers are scaled by plainScale.

      Returns ScrubbingParts | null

      The accepted parts, or null when the text must be rejected.