13 code results in eprints/eprints or view all results on GitHub
| 3 | # validate_user( $user, $repository, $for_archive ) |
| … | |
| 9 | # - Repository object (the current repository) |
| 10 | # $for_archive |
| 11 | # - boolean (see comments at the start of the validation section) |
| 12 | # |
| 13 | # returns: @problems |
| 14 | # - ARRAY of DOM objects (may be null) |
Perl
Showing the top two matches
Last indexed | 7 | # - Repository object (the current repository) |
| 8 | # $for_archive |
| 9 | # - boolean (see comments at the start of the validation section) |
| 10 | # |
| 11 | # returns: @problems |
| … | |
| 28 | my( $field, $value, $repository, $for_archive ) = @_; |
| 29 | |
| 30 | my $xml = $repository->xml(); |
| 31 | |
| 32 | # only apply checks if the value is set |
Perl
Showing the top two matches
Last indexed | 587 | if( $field->{required} ) # moj: Handle for_archive |
| 588 | { |
| 589 | $label = $self->{session}->html_phrase( |
| 590 | "sys:ep_form_required", |
| … | |
| 625 | content => $doc_cont, |
| 626 | }); |
| 627 | } |
| 628 | |
| 629 | sub validate |
| 630 | { |
| 631 | my( $self ) = @_; |
| 632 | |
| 633 | my @problems = (); |
| 634 | |
| 635 | my $for_archive = $self->{workflow}->{for_archive}; |
Perl
Showing the top two matches
Last indexed | 108 | my( $self ) = @_; |
| 109 | |
| 110 | my $field = $self->{config}->{field}; |
| 111 | |
| 112 | my $for_archive = defined($field->{required}) && |
| 113 | $field->{required} eq "for_archive"; |
| 114 | |
| 115 | my @problems; |
| 116 | |
| 117 | # field requires a value |
| 118 | if( $self->is_required() && !$self->{dataobj}->is_set( $field->{name} ) ) |
Perl
Showing the top two matches
Last indexed | 88 | my $problems = $self->{processor}->{eprint}->validate( $self->{processor}->{for_archive}, $self->workflow_id ); |
| 89 | if( scalar @{$problems} > 0 ) |
| … | |
| 207 | my $problems = $self->{processor}->{eprint}->validate( $self->{processor}->{for_archive} ); |
| 208 | if( scalar @{$problems} > 0 ) |
| 209 | { |
| 210 | $self->{processor}->add_message( "error", $self->html_phrase( "validation_errors" ) ); |
Perl
Showing the top two matches
Last indexed | 1086 | =item $problems = $eprint->validate( [$for_archive], $workflow_id ) |
| 1087 | |
| 1088 | Return a reference to an array of XHTML DOM objects describing |
| … | |
| 1097 | =cut |
| 1098 | ###################################################################### |
| 1099 | |
| 1100 | sub validate |
| 1101 | { |
| 1102 | my( $self , $for_archive, $workflow_id ) = @_; |
| 1103 | |
| 1104 | return [] if $self->skip_validation; |
Perl
Showing the top two matches
Last indexed