Jelajahi Sumber

add some documentation

Falko Schindler 1 tahun lalu
induk
melakukan
3482a7ac17

+ 1 - 0
nicegui/elements/input.py

@@ -31,6 +31,7 @@ class Input(ValidationElement, DisableableElement, component='input.js'):
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         The key of the first rule that fails will be displayed as an error message.
         The key of the first rule that fails will be displayed as an error message.
         Alternatively, you can pass a callable that returns an optional error message.
         Alternatively, you can pass a callable that returns an optional error message.
+        To disable the automatic validation on every value change, you can use the `without_auto_validation` method.
 
 
         Note about styling the input:
         Note about styling the input:
         Quasar's `QInput` component is a wrapper around a native `input` element.
         Quasar's `QInput` component is a wrapper around a native `input` element.

+ 1 - 0
nicegui/elements/number.py

@@ -30,6 +30,7 @@ class Number(ValidationElement, DisableableElement):
         e.g. ``{'Too small!': lambda value: value < 3}``.
         e.g. ``{'Too small!': lambda value: value < 3}``.
         The key of the first rule that fails will be displayed as an error message.
         The key of the first rule that fails will be displayed as an error message.
         Alternatively, you can pass a callable that returns an optional error message.
         Alternatively, you can pass a callable that returns an optional error message.
+        To disable the automatic validation on every value change, you can use the `without_auto_validation` method.
 
 
         :param label: displayed name for the number input
         :param label: displayed name for the number input
         :param placeholder: text to show if no value is entered
         :param placeholder: text to show if no value is entered

+ 1 - 0
nicegui/elements/select.py

@@ -37,6 +37,7 @@ class Select(ValidationElement, ChoiceElement, DisableableElement, component='se
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         The key of the first rule that fails will be displayed as an error message.
         The key of the first rule that fails will be displayed as an error message.
         Alternatively, you can pass a callable that returns an optional error message.
         Alternatively, you can pass a callable that returns an optional error message.
+        To disable the automatic validation on every value change, you can use the `without_auto_validation` method.
 
 
         :param options: a list ['value1', ...] or dictionary `{'value1':'label1', ...}` specifying the options
         :param options: a list ['value1', ...] or dictionary `{'value1':'label1', ...}` specifying the options
         :param label: the label to display above the selection
         :param label: the label to display above the selection

+ 1 - 0
nicegui/elements/textarea.py

@@ -21,6 +21,7 @@ class Textarea(Input, component='input.js'):
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         e.g. ``{'Too long!': lambda value: len(value) < 3}``.
         The key of the first rule that fails will be displayed as an error message.
         The key of the first rule that fails will be displayed as an error message.
         Alternatively, you can pass a callable that returns an optional error message.
         Alternatively, you can pass a callable that returns an optional error message.
+        To disable the automatic validation on every value change, you can use the `without_auto_validation` method.
 
 
         :param label: displayed name for the textarea
         :param label: displayed name for the textarea
         :param placeholder: text to show if no value is entered
         :param placeholder: text to show if no value is entered