mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 22:32:33 +03:00
rename to inputs
This commit is contained in:
parent
fb9933097b
commit
122637f5f3
@ -40,7 +40,7 @@ type File struct {
|
||||
// HTML Templates Structs
|
||||
|
||||
// post-form.html
|
||||
type HtmlFormErrors struct {
|
||||
type Inputs struct {
|
||||
Title string
|
||||
Text string
|
||||
Files string
|
||||
@ -51,7 +51,8 @@ type HtmlFormData struct {
|
||||
FirstPostID int
|
||||
CaptchaID string
|
||||
IsCaptchaActive bool
|
||||
Errors HtmlFormErrors
|
||||
Errors Inputs
|
||||
Inputs
|
||||
}
|
||||
|
||||
// index.html
|
||||
|
@ -101,8 +101,8 @@ func ValidatePost(title, text string, files []*multipart.FileHeader) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.HtmlFormErrors {
|
||||
validationError := new(repositories.HtmlFormErrors)
|
||||
func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.Inputs {
|
||||
validationError := new(repositories.Inputs)
|
||||
hasErrors := false
|
||||
|
||||
if text == "" && len(files) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user