Attributes
- Companion
- class
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ToneValidator.type
Members list
Value members
Concrete methods
A validator that accepts every tone in Tone.all, so validate always returns Right.
A validator that accepts every tone in Tone.all, so validate always returns Right.
Attributes
Create a tone validator that accepts the given tones.
Create a tone validator that accepts the given tones.
Value parameters
- allowedTones
-
the tones that pass; see ToneValidator for how a text's tone is detected
Attributes
- Returns
-
a validator equivalent to
new ToneValidator(allowedTones)
A validator that accepts Tone.Casual or Tone.Friendly output, and rejects the rest.
A validator that accepts only Tone.Professional output.
A validator that accepts only Tone.Professional output.
Output with no professional keyword, such as plain factual text, is Neutral and is rejected; add Tone.Neutral through ToneValidator(Set(Tone.Professional, Tone.Neutral)) to let it through.
Attributes
A validator that accepts Tone.Professional or Tone.Friendly output, and rejects the rest.
A validator that accepts Tone.Professional or Tone.Friendly output, and rejects the rest.