diff --git a/tests/validations.test.js b/tests/validations.test.js index ceadd3ee9..d4c6806e0 100644 --- a/tests/validations.test.js +++ b/tests/validations.test.js @@ -45,7 +45,6 @@ describe('validateDomainData', () => { { ...defaultDomain, record: { CNAME: 'sd', A: ['121,3213'] } }, { ...defaultDomain, record: { A: ['121', '12'], FOOBAR: ['sd'] } }, { ...defaultDomain, record: { A: [] } }, - { ...defaultDomain, record: { A: ['11122'], URL: 'foobar' } }, { ...defaultDomain, owner: {}, }, { ...defaultDomain, owner: { username: 'hwelo', }, }, { ...defaultDomain, owner: { email: 'hwelo' }, }, diff --git a/utils/validations.js b/utils/validations.js index 87455d019..67a8d3df5 100644 --- a/utils/validations.js +++ b/utils/validations.js @@ -7,11 +7,6 @@ const isValidURL = and([R.is(String), testRegex(/^https?:\/\//ig)]); const isValidDomain = and([R.is(String), testRegex(/^(([a-z0-9\-]+)\.)+[a-z]+$/ig)]); -const allowMXRecord = R.compose( - R.ifElse(R.includes('MX'), withLengthEq(2), withLengthEq(1)), - R.keys, -); - const validateCnameRecord = type => and([ R.propIs(String, type), R.compose(withLengthEq(1), R.keys), // CNAME cannot be used with any other record @@ -21,7 +16,6 @@ const validateCnameRecord = type => and([ const validateARecord = type => and([ R.propIs(Array, type), - allowMXRecord, R.propSatisfies(withLengthGte(1), type), ]);