Skip to main content
Glama
util.rs591 B
use std::env; use regex::Regex; pub fn validate_email(email: &str) -> bool { let email_regex = Regex::new(r#"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"#) .expect("Static verified regex should always compile"); email_regex.is_match(email) } pub fn validate_account_name(account_name: &str) -> bool { if account_name.len() < 3 || account_name.len() > 16 { return false; } account_name .chars() .all(|c| c.is_alphanumeric() || c == '_' || c == '-') } pub fn get_runner() -> Option<String> { env::var("FOREVERVM_RUNNER").ok() }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jamsocket/forevervm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server