View source: R/11.0-core-validators.R
| validate_positive | R Documentation |
Specialized validator for positive numeric values.
validate_positive(value, param_name, strategy = "strict", min_val = 0.001)
value |
Value(s) to validate |
param_name |
Parameter name |
strategy |
Handling strategy |
min_val |
Minimum positive value (default 0.001) |
An object of class fb4_validation (see
validation_result). valid is TRUE when all
values are \ge min_val. Violations are recorded in
errors (strategy = "strict") or warnings
(strategy = "warn").
validate_positive(5, "weight")
validate_positive(0, "weight")$valid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.