blob: 8f3409fe6ebeac669a367ab6ab9c3d09bc6a918c (
plain) (
blame)
1
2
3
4
5
6
7
8
|
const validation = {
isValidColor: (color) => /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(color),
isValidPort: (port, required) => parseInt(port) > (required ? 0 : -1) && parseInt(port) <= 65565,
isValidAddress: (address) => true // TODO
};
export default validation;
|