ict;
package HTML::FormFu::Constraint::JSON;
# ABSTRACT: Valid JSON string
$HTML::FormFu::Constraint::JSON::VERSION = '2.07';
use JSON::MaybeXS qw( decode_json );
use Moose;
extends 'HTML::FormFu::C
= decode_json($value);
return $self->not ? !$ok : $ok;
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
HTML::FormFu::Constraint::JSON - Valid JSON string
=head1 VERSION
version 2.07
=head1 DESCRIPTION
Checks for valid JSON string
=head1 SEE ALSO
Is a sub-class of, and inherits methods from L<HTML::FormFu::Constraint>
L<HTML::FormFu>
=head1 AUTHO
ION
If you need the content of a formular as hashref or for processing with other modules
like C<JSON> you can use this model.
=head1 METHODS
=head2 create
This method creates a hashref from a fil
orm_constraint_integer => 'This field must be an integer',
form_constraint_json => 'This field must be a valid JSON string',
form_constraint_length => 'Must be between [_1] and [_2] charac
raint::File::Size>
=item L<HTML::FormFu::Constraint::Integer>
=item L<HTML::FormFu::Constraint::JSON>
=item L<HTML::FormFu::Constraint::Length>
=item L<HTML::FormFu::Constraint::MaxLength>
=item