Merge pull request #6993 from cmrd-senya/diaspora-id-validation
Use diaspora_id validation from the federation gem
This commit is contained in:
commit
d022e51a0c
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ class PeopleController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def diaspora_id?(query)
|
def diaspora_id?(query)
|
||||||
!query.try(:match, /^(\w)*@([a-zA-Z0-9]|[-]|[.]|[:])*$/).nil?
|
!(query.nil? || query.lstrip.empty?) && Validation::Rule::DiasporaId.new.valid_value?(query)
|
||||||
end
|
end
|
||||||
|
|
||||||
# view this profile on the home pod, if you don't want to sign in...
|
# view this profile on the home pod, if you don't want to sign in...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue