mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-06 16:02:17 +00:00
9 lines
208 B
Rust
9 lines
208 B
Rust
![]() |
use validator::ValidationError;
|
||
|
|
||
|
pub fn required_not_empty_str(s: &str) -> Result<(), ValidationError> {
|
||
|
if s.is_empty() {
|
||
|
return Err(ValidationError::new("should not be empty string"));
|
||
|
}
|
||
|
Ok(())
|
||
|
}
|