Geo
#longitude
#geo
#coordinates
#location
Longitude
Matches a geographic longitude coordinate between -180 and +180 degrees, with up to 6 decimal places.
✓ GPS coordinate input✓ Map integrations✓ Location-based services
✓ Valid Examples
- -0.1278
- 151.2093
- 0
- 180
- -180.000000
✗ Invalid Examples
- 181.0
- -180.1
- abc
- 0.123456789
Usage & Integration
Validate Longitude natively in your backend or frontend without copying regex strings.
Node / Edge
import { validate } from '@regexto/validators';
validate('longitude', '...');Python
from regexto_validators import validate
validate("longitude", "...")Go
import "github.com/regex-to/validators-go"
valid, err := validators.Validate("longitude", "...")PHP
use RegexTo\Validators\Validator;
Validator::validate('longitude', '...');Rust
use regexto_validators::validate;
let is_valid = validate("longitude", "...").unwrap();